Objective-C: NSString not being entirely decoded from UTF-8
问题 I'm querying a web server which returns a JSON string as NSData . The string is in UTF-8 format so it is converted to an NSString like this. NSString *receivedString = [[NSString alloc] initWithData:receivedData encoding:NSUTF8StringEncoding]; However, some UTF-8 escapes remain in the outputted JSON string which causes my app to behave erratically. Things like \u2019 remain in the string. I've tried everything to remove them and replace them with their actual characters. The only thing I can