2 ms·
You just said there was one canonical length for strings then gave me 4: bytes, code points, grapheme clusters and characters, each of which applies in a differ
by arcticbull 5y ago
You just said there was one canonical length for strings then gave me 4: bytes, code points, grapheme clusters and characters, each of which applies in a different context.
I’m not 100% sure what context characters even apply in on a computer other than interest sake.
Invisible/zero-width characters are not interesting when editing text, and character count doesn’t correlate with size, therefore there’s no canonical length.
- JohnHaugeland 5y ago> You just said there was one canonical length for strings then gave me 4: bytes, code points, grapheme clusters and characters, each of which applies in a different context. The other things have different labels than "length," which you've already been told. . > Invisible/zero-width characters are not interesting when editing text Well, tell Unicode they're wrong, then, I guess. Have a good day.
- arcticbull 5y agoTo be clear I appreciate you sharing the official characters concept definition, and I do think it’s valuable.