If you convert JSON data
{ "result" : "\u8aaa" }
before NSDictionary (e.g. using NSJSONSerialization ) and print the dictionary
NSError *error; NSDictionary *jsonDict = [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:&error]; NSLog(@"%@", jsonDict);
then you get a conclusion
{ result = "\U8aaa"; }
The reason is that the description method NSDictionary uses the escape sequences "\ Unnnn" for all non-ASCII characters. But this is only for display in the console, the dictionary is correct!
If you print the key value
NSLog(@"%@", [jsonDict objectForKey:@"result"]);
then you get the expected result
čŖŖ
Martin r
source share