Re:The Tragedy of UCS-2
by raphlinus on Saturday August 03, 2019 @02:30PM
(#20601857)
Sure. I guess what I'm trying to say is: when do you care about code point boundaries at all? In my experience, it's actually fairly rare. If you're drawing text, you care about the result after shaping. If you're moving the cursor, you care about grapheme cluster boundaries. If you're doing stuff like sorting and collation, you should use specialized Unicode libraries that get this stuff right. When is the last time you wrote code that really needed to iterate Unicode code points specifically?
[ Parent
| on HN ]
> When is the last time you wrote code that really needed to iterate Unicode code points specifically?
We do it all the time. Splitting a string at U+002C or U+003B or U+000A, looking for U+007B or U+007D, etc. In my experience, it's really common.
Right, and if you're doing processing of ASCII code points (this is 95% of Markdown parsing, for example, the major exception being case folding and Unicode whitespace), then it's just as convenient to do those in UTF-8 as any other representation.
Re:The Tragedy of UCS-2
by a1369209993 on Saturday August 03, 2019 @06:27PM
(#20603119)
Those aren't unicode code points; those are bytes.