Info
This post is auto-generated from RSS feed The Rust Programming Language Forum - Latest topics. Source: Chars().count() return different value depending on normalization
Chars().count() return different value depending on normalization
โ rust ๐ 2025-05-09 ๐ค surdeus ๐๏ธ 2chars().count()
is supposed to return the number of characters in a Unicode string.
I found out that depending on unicode normalization forms, it is not always the case.
See Rust Playground
I get accents as separate characters.
Is this on purpose ? (if so why??)
How do I always get a consistent count of 8 characters for the "kรฉrosรจne"
string ?
2 posts - 2 participants
๐ท๏ธ rust_feed