4 ms·
> fixed-length (like UTF-32), Utf-32 is only fixed length if you don't care about diacritics, variation selectors, RTL languages, and others. Unicode is not on
by asveikau 11y ago
> fixed-length (like UTF-32),
Utf-32 is only fixed length if you don't care about diacritics, variation selectors, RTL languages, and others. Unicode is not one code point or one char/wchar/uint32 per glyph.
- gilgoomesh 11y agoYou've changed topic from code points to grapheme clusters. Rust's character/string support is strictly for code points (the documentation is fairly clear about the distinction). Few string libraries actually deal with grapheme clusters as the native underlying representation (Swift being a notable exception).
- asveikau 11y agoThe broader point I'm making is that unicode is hard and attempts to simplify it by choosing a different encoding (i.e. switching to utf-32 to save yourself from all problems) are a bit misguided.
- sidarape 11y agoMy life is a lie.