10 ms·
It really can't. UTF-16 extends the space by 20 bits (split into 10 bits in each surrogate pair), and the highest UTF-16 sequence DBFF DFFF is 0x10FFFF.
by userbinator 12y ago
It really can't. UTF-16 extends the space by 20 bits (split into 10 bits in each surrogate pair), and the highest UTF-16 sequence DBFF DFFF is 0x10FFFF.
- mikeash 12y agoAnd the UCS-2 limit is merely 0xFFFF, which of course is not big enough to handle all common human languages, thus why UTF-16 happened in the first place.
- vorg 12y agoYou can define a second-tier surrogate system in UTF-16 on the last 2 planes (plane 0xF and plane 0x10), which are both private use, to access all codepoints up to 0x7FFFFFFF. Use plane 0xF as leading 2nd-tier surrogates, and plane 0x10 as trailing 2nd-tier surrogates. I've written a package in go that does just that: https://github.com/gavingroovygrover/utf88 https://github.com/gavingroovygrover/utf88