cpdf-source icon indicating copy to clipboard operation
cpdf-source copied to clipboard

JSON format UTF-8 required?

Open johnwhitington opened this issue 5 months ago • 0 comments

Per YoJSON:

"Note that yojson never checks the encoding of strings. All ASCII-compatible encodings including UTF-8 are supported by yojson readers and writers. Non-ASCII-compatible encodings UTF-16BE, UTF-16LE, UTF-32BE and UTF-32LE are not supported. "\uXXXX" escape sequences are converted by the readers into the equivalent UTF-8 multibyte sequences. Characters outside the ASCII range are always written as is, as permitted by the JSON standard. Bytes that do not form valid UTF-8 characters are also output as is. It is the user's responsibility to check for the correctness of UTF-8 data when appropriate."

See also:

https://stackoverflow.com/questions/1443158/binary-data-in-json-string-something-better-than-base64

johnwhitington avatar Mar 25 '24 14:03 johnwhitington