News for hackers. Stuff that matters.
Re:It’s Not Wrong that “ ”.length == 7 by zarzavat on Friday June 02, 2023 @10:15AM (#36165379)
Everything that you can do to a Unicode string, except concatenation, is defined in terms of code points. Normalization, case transformations, collation, regexes, layout and rendering and encoding.

For example, let’s say you want to define a “natural sort” order that sorts e.g. “A2” < “A10”. To do that you divide the string at boundaries between code points in ranges of each numeral type that you are supporting (e.g. western numerals, Arabic numerals, Chinese numerals).

Re:It’s Not Wrong that “ ”.length == 7 by wtetzner on Saturday June 03, 2023 @08:50PM (#36181956)
Wouldn't layout/rendering etc. be done in terms of grapheme clusters?