3 ms·
An interesting possible application for this is JSON parsers. If JSON strings contain unpaired surrogate code points, they could either throw an error or encod
by haberman 11y ago
An interesting possible application for this is JSON parsers. If JSON strings contain unpaired surrogate code points, they could either throw an error or encode as WTF-8. I bet some JSON parsers think they are converting to UTF-8, but are actually converting to GUTF-8.
- SimonSapin 11y agoIf you want to preserve unpaired surrogates that are hex-encoded in JSON strings, WTF-8 could help. But it’s unclear to me that you should: https://tools.ietf.org/html/rfc7159#section-8.2 https://tools.ietf.org/html/rfc7159#section-8.2