Grapheme Cluster Counter

Count user-perceived characters, including emoji and combining marks.

How to interpret Unicode and segmentation

Grapheme Cluster Counter works with a layer of text that is not always visible on screen. A user-perceived character may contain several code points, emoji may use ZWJ sequences, and word rules vary by language.

  • Distinguish UTF-16 units, code points, and grapheme clusters before defining field limits or positions.
  • Use normalization when comparing equivalent text represented by different sequences.
  • Treat results as a default analysis: languages such as Thai, Chinese, and Japanese may need tailored rules.
Practical tip: Do not cut text inside a grapheme cluster. Test emojis, combining marks, and different scripts.

Como usar este módulo

Grapheme clusters aproximam a unidade que o usuário percebe como um caractere. Isso evita confundir code points, unidades UTF-16 e emojis compostos ao contar ou limitar texto.

Dica prática: Use grapheme clusters para limites de interface sempre que a regra representar caracteres percebidos pelo usuário.