iphone - Non-English Characters in JSON -


I am using a JSON file that contains non-English characters. So when I'm getting value from this file, I'm showing some sugar-like characters in the simulator. In the console, I

  \ U2021 \ U00c6 \ U00e1 \ U2021 \ U00c6 \ U00a9 \ U2021 \ U00d8 \ U00e7 \ U2021 getting value such as \ U00c6 \ U00b1 \ U2021 \ U00d8 \ U00e0 \ U2021 \ U00c6 \ U00d6 \ U2021 \ U00c6 \ U00d6 \ U2021 \ U00c6 \ U2264 \ U2021 \ U00c6 \ U2122 \ U2021 \ U00d8 \ U00e7 \ U2021 \ U00c6 \ U00b1 \ U2021 \ U00d8 \ U00e0 \ U2021 \ U00c6 \ U00ef \ U2021 \ U00d8 \ U00e7 \ U2021 \ U00c6 \ U00ef \ U2021 \ U00d8 \ U00c7 \ U2021 \ U00c6 \ U00fc ...   

Any ideas?

Try to print in this way:

  NSString * currentString = [[[NSString alloc] initWithData: character buffer encoding: NSUTF8StringEncoding] autorelease]; NSLog (@ "converged string:% @", current string);   

where characterBuffer is the buffer where you collected the data obtained, NSUTF8StringEncoding Replace with the appropriate encoding used on your server goes.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -