What every software developer must know about Unicode in 2023
There&#x27;s one part of this document that I would push extremely hard against, and that&#x27;s the notion that &quot;extended grapheme clusters&quot; are the one true, right way to think of characters in Unicode, and therefore any language that views the length in any other way is doing it wrong.<p>The truth of the matter is that there are several different definitions of &quot;character&quot;, depending on what you want to use it for. An extended grapheme cluster is largely defined on &quot;this visually displays as a single unit&quot;, which isn&#x27;t necessarily correct for things like &quot;display size in a monospace font&quot; or &quot;thing that gets deleted when you hit backspace.&quot; Like so many other things in Unicode, the correct answer is use-case dependent.<p>(And for this reason, String iteration should be based on codepoints--it&#x27;s the fundamental level on which Unicode works, and whatever algorithm you want to use to derive the correct answer for your purpose will be based on codepoint iteration. hsivonen&#x27;s article (<a href="https:&#x2F;&#x2F;hsivonen.fi&#x2F;string-length&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;hsivonen.fi&#x2F;string-length&#x2F;</a>), linked in this one, does try to explain why extended grapheme clusters is the wrong primitive to use in a language.)