3 ms·
I'm a bit confused that TJSON only allows UTF-8 strings. The only way to escape Unicode characters in JSON is \uXXXX. But to encode astral characters with this
by gengkev 10y ago
I'm a bit confused that TJSON only allows UTF-8 strings. The only way to escape Unicode characters in JSON is \uXXXX. But to encode astral characters with this syntax, UTF-16 surrogate pairs must be used. How does TJSON handle this, if strings must be encoded with UTF-8 only?
- rurban 10y agoJSON is defined to use surrogate pairs to encode these. TJSON must do nothing here. e.g. \ud8a4\uddd1 => U+391d1