27 ms·
"So for example, a string containing only the G clef character (U+1D11E) may be represented as "\uD834\uDD1E"" eww, UTF-16 surrogate pairs. Die, die, die, yo
by penguindev 13y ago
"So for example, a string containing only the G clef
character (U+1D11E) may be represented as "\uD834\uDD1E""
eww, UTF-16 surrogate pairs. Die, die, die, you scourge.
(Yes, I've been working with the win32 api lately, which was designed for UCS2/UTF-16).
when has 16 bit anything been a good idea, really. TCP port ranges, looking at you too.
- quink 13y agoChar can be anything not " or \. You don't have to escape unicode. If you want to just use Unicode and encode as UTF-8 then go nuts. This is valid JSON: { "äöü": "大家好", "clef": "𝄞" }
- penguindev 13y agoI realize that. I'm just sad to see UTF-16 vestiges living on, in current specs. Who can fathom how much misery and billions of dollars in wasted productivity (byte order marks - fun!) that wrought upon the IT landscape.... Python has an upper case \UXXXXXXXX literal that seems a lot cleaner.
- deleted 13y ago[deleted]