Hello guys,
I'm trying to sent to a server some french words and the special characters are sent as 'É' , 'î' , â and so on. For the sending part i'm using a WWW variable with the " new WWW(url, body, headers); " type constructor. I tried normalizing the string and also encoding the string with the following method:
void Encode(ref string Message)
{
Encoding iso = Encoding.GetEncoding("ISO-8859-1");
Encoding utf8 = Encoding.UTF8;
byte[] utfBytes = utf8.GetBytes(Message);
byte[] isoBytes = Encoding.Convert(utf8, iso, utfBytes);
string msg = iso.GetString(isoBytes);
Message = msg;
}
but it does not work. The app is for Android and IOS and the sending part is made in a separate thread.
Can any of you give me a tip or a solution to this problem?
Thank you!
↧