You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 10, 2019. It is now read-only.
The -jsonStringValue method converts all Unicode characters above the UTF8 range into escaped hex representation, so später will always get JSON encoded as "sp\u004xter". The assumption is that the caller wants UTF-8 encoded JSON.
JSON can be encoded as UTF-16 or UTF-32, but then it must be represented as binary data. BSJSONAdditions only generates UTF-8 JSON.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Strings such as später are being encoded as sp‰ter
Possible Solution:
replace
default:
-- [jsonString appendFormat:@"%c", nextChar];
++ [jsonString appendString:[NSString stringWithCharacters:&nextChar length:1]];
break;
or
default:
if (nextChar >0x7e){
[jsonString appendFormat: @"\u%04x", nextChar];
}
else {
[jsonString appendFormat:@"%c", nextChar];
}
Former will place the unicode char into the string itself (eg später)
latter will escape the unicode char (eg sp\u00e4ter)
The text was updated successfully, but these errors were encountered: