1943Re: [json] JSON strings cannot point to post-BMP Unicode codepoints?
- Apr 7 11:21 AMShriramana Sharma scripsit:
> However, if that restriction of *four* hex digits is meant to beIt can be represented either as the actual character, 4 bytes in any
> enforced, then it means that post-BMP codepoints (such as 0x11005
> BRAHMI LETTER A) cannot be represented in such strings directly, but
> that they have to be manually (i.e. by the program outputting JSON-ed
> data) decomposed into their equivalent UTF16 surrogate pairs (for
> instance, 0xd804 0xdc05).
of UTF-8, UTF-16, or UTF-32; or else as two consecutive ASCII escapes:
> IMHO this is an unnecessary restriction.JSON is backward compatible by design with ECMAScript 3, which does not
support the \U escape.
> Does it mean that even though there is no \U notation, I can directlyCorrect.
> input post-BMP codepoints as part of the string literals?
> In this case even the \u notation is only there as a just-in-case?Just so.
There are three kinds of people in the world: John Cowan
those who can count, cowan@...
and those who can't.
- << Previous post in topic Next post in topic >>