Only encode JSON with UTF8, following recommendation of NSJSONSerialization documentation
Signed-off-by: Mattt Thompson <m@mattt.me>
This commit is contained in:
parent
bab6a8b28f
commit
205a8aa7e3
@ -75,7 +75,7 @@ static dispatch_queue_t json_request_operation_processing_queue() {
|
||||
} else {
|
||||
// Workaround for a bug in NSJSONSerialization when Unicode character escape codes are used instead of the actual character
|
||||
// See http://stackoverflow.com/a/12843465/157142
|
||||
NSData *JSONData = [self.responseString dataUsingEncoding:self.responseStringEncoding];
|
||||
NSData *JSONData = [self.responseString dataUsingEncoding:NSUTF8StringEncoding];
|
||||
self.responseJSON = [NSJSONSerialization JSONObjectWithData:JSONData options:self.JSONReadingOptions error:&error];
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user