Hi,
I have since I started programming always had one issue, wich is encoding of text...
Now once again I have the same problem with JSON.
I'm using the lfs hostprogress json data sheet (http://www.lfsworld.net/pubsta ... S.C+%95+Aston+Cruise+%231 ) to use real-time serverinfo in a .net program.
Tho I have one big issue, wich is that when I read the hostname, I can't get the "special" characters to work.
Json:
The "\u0095" should be a •
So well all that is clear to me. But then I want to use JSON.NET to read data from the json file:
so now I would think hostname should work perfectly... But it doesn't it now just has a space on where the • should be.
Another thing i found is that
isn't the same result as
So is there anyone who can help me fixing this silly issue..
I have since I started programming always had one issue, wich is encoding of text...
Now once again I have the same problem with JSON.
I'm using the lfs hostprogress json data sheet (http://www.lfsworld.net/pubsta ... S.C+%95+Aston+Cruise+%231 ) to use real-time serverinfo in a .net program.
Tho I have one big issue, wich is that when I read the hostname, I can't get the "special" characters to work.
Json:
{"hostinfo":{"host":"^6WS^7.^3C^7 \u0095 Aston Cruise #1","host_parsed":"<font color=\"#00FFFF\">WS<\/font><font color=\"#FFFFFF\">.<\/font><font color=\"#FFFF00\">C<\/font><font color=\"#FFFFFF\"> • Aston Cruise #1<\/font>","host_stripped":"WS.C \u0095 Aston Cruise....
The "\u0095" should be a •
So well all that is clear to me. But then I want to use JSON.NET to read data from the json file:
JObject Jhostprogress = JObject.Parse(strings[1]); // strings is received with WebRequest & WebResponse
JObject Jhostinfo = (JObject)Jhostprogress["hostinfo"];
string hostname = (string)Jhostinfo["host"];
so now I would think hostname should work perfectly... But it doesn't it now just has a space on where the • should be.
Another thing i found is that
string testBull = "•";
isn't the same result as
string testBull = "\u0095";
So is there anyone who can help me fixing this silly issue..