Skip to content Skip to sidebar Skip to footer

Tcp Server Gets ???????? Instead Of The Real Message

The server is written in c# and works correctly with a client I made in c#, now i'm trying to make an android client but the server doesn't get the real message, it gets just a lot

Solution 1:

Change:

string message = Encoding.Unicode.GetString(buffer, 0, data);

into:

string message = Encoding.UTF8.GetString(buffer, 0, data);

Try also UTF16. I think java uses this encoding now.

Post a Comment for "Tcp Server Gets ???????? Instead Of The Real Message"