{
  "slug": "grapheme-cluster",
  "term": "Grapheme cluster",
  "aliases": [
    "Extended grapheme cluster",
    "EGC"
  ],
  "definition": "A grapheme cluster is a Unicode text segment delimited by specified boundary rules to approximate a user-perceived character.",
  "note": "Variant: Default extended grapheme clusters follow UAX #29 boundary rules; legacy and tailored clusters are distinct alternatives. State the Unicode version and any tailoring when recording a count. A cluster can contain several scalar values, and a rendered glyph can span more than one cluster. [unicode-graphemes]\n\nCounting: U+0065 U+0301 is one extended cluster, two scalar values, two UTF-16 units and three UTF-8 bytes. U+1F1F5 U+1F1F1 is one extended cluster but eight UTF-8 bytes. Segmenting text does not normalize its spelling or determine a filesystem's name-equality policy. [unicode-graphemes] [rfc-utf8]\n\nStorage: A cluster limit is not a byte quota: repeated combining marks can extend one cluster. Truncating at a scalar boundary can still split a cluster. A display label may be shortened at an appropriate cluster boundary, but a recovery identifier needs its original representation or an explicit reversible mapping. [unicode-graphemes] [hesela-units]\n\nChunking: Boundary decisions need context. For three regional indicators split after the first, separate segmentation yields (first) (second third), but whole-text segmentation yields (first second) (third). Both have two clusters, so count equality alone does not validate boundaries. The linked probe records both partitions without changing the scalar sequence; it is not a streaming segmenter. [unicode-graphemes] [hesela-units]",
  "limitations": [
    "Default boundaries approximate user expectations; script, language and application requirements can need tailoring."
  ],
  "related": [
    "character-encoding",
    "unicode-scalar-value",
    "unicode-normalization"
  ],
  "citations": [
    {
      "id": "unicode-graphemes",
      "title": "Unicode Standard Annex 29 revision 47: grapheme cluster boundaries",
      "url": "https://www.unicode.org/reports/tr29/tr29-47.html#Grapheme_Cluster_Boundaries",
      "accessed": "2026-11-17"
    },
    {
      "id": "rfc-utf8",
      "title": "RFC 3629: UTF-8 validity and malformed input",
      "url": "https://www.rfc-editor.org/rfc/rfc3629.html",
      "accessed": "2026-11-17"
    },
    {
      "id": "hesela-units",
      "title": "Hesela: text length units in filename recovery",
      "url": "https://hesela.com/analyses/filename-identity-backup-restores/#unicode-length-units",
      "accessed": "2026-11-17"
    }
  ],
  "provenance": [
    "UAX #29 revision 47 supplies the reference rules. The linked bounded examples record Node, ICU and Unicode versions; they are not a complete segmentation-conformance test."
  ],
  "status": "shipping",
  "advantages": [],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-17"
}
