- Home /
reading xml containing special characters from web
Hi, I read an xml file from web (encoding="ISO-8859-1") When I encounter special characters (like ü) Unity cannot recognize it (it gives a question mark) What can I do? Thanks
Answer by trumanita · Nov 23, 2011 at 08:39 PM
Solved!
I used www.text
now I use
string xmlText= System.Text.Encoding.GetEncoding("ISO-8859-1").GetString(www.bytes);
thanks
Answer by DaveA · Nov 23, 2011 at 05:16 PM
What do you mean by 'reading' 'encounter' and 'recognize'? Is the XML parser you're using giving errors? Or do you mean it's not displaying this properly, if so, how are you trying to display it? Could be the font you're using doesn't have those characters.
I give you an example: my remote xml contains word Türkiye if in my script I do:
string mystring="Türkiye" if(mystring==stringFromX$$anonymous$$L){...}
control fails In editor debug log I read T?rkiye
I hope I've been clear thanks bye