Closed Ryumizuhi closed 6 years ago
This doesn't seem to be related to parsing the text as it looks like your text doesn't arrive with a known encoding. The response from the server seems to be "iso-8859-1" encoded which is latin-1
The best solution would be if you could make your server to return an utf8 encoded string. So you could try including an "Accept-Charset" request header and requesting utf8 encoding.
If that doesn't work you would need to use the iso-8859-1 encoding to properly translate the received bytes into a string. Something like that:
System.Text.Encoding iso_8859_1 = System.Text.Encoding.GetEncoding("iso-8859-1");
string text = iso_8859_1.GetString(www2.bytes);
Though working with utf8 would be the prefered solution.
Thank, I have just add https:// before the adresse and the request work.
Hi I have a problem when I try to parse a file with JSON an Android device.
The line 58 of the file below return a warning "Unsupported encoding: 'iso-8859-1,application/json'". And the line 65 return a null value.
The JSON file that I download with the WWW function :
What can I change to make it work ?
Marie