{
  "title": "ClearCount Unicode character test fixtures",
  "updated": "2026-11-08",
  "guide": "https://charactercounterhq.com/blog/test-character-limits-with-unicode/",
  "scope": "Counts are for each decoded text value, before trimming, normalization or serialization. Graphemes means extended grapheme clusters. No CRLF cases are included.",
  "cases": [
    {
      "id": "ascii-nine",
      "text": "AAAAAAAAA",
      "code_points": [
        "U+0041",
        "U+0041",
        "U+0041",
        "U+0041",
        "U+0041",
        "U+0041",
        "U+0041",
        "U+0041",
        "U+0041"
      ],
      "expected": {
        "graphemes": 9,
        "code_points": 9,
        "utf16_units": 9,
        "utf8_bytes": 9
      }
    },
    {
      "id": "ascii-ten",
      "text": "AAAAAAAAAA",
      "code_points": [
        "U+0041",
        "U+0041",
        "U+0041",
        "U+0041",
        "U+0041",
        "U+0041",
        "U+0041",
        "U+0041",
        "U+0041",
        "U+0041"
      ],
      "expected": {
        "graphemes": 10,
        "code_points": 10,
        "utf16_units": 10,
        "utf8_bytes": 10
      }
    },
    {
      "id": "ascii-eleven",
      "text": "AAAAAAAAAAA",
      "code_points": [
        "U+0041",
        "U+0041",
        "U+0041",
        "U+0041",
        "U+0041",
        "U+0041",
        "U+0041",
        "U+0041",
        "U+0041",
        "U+0041",
        "U+0041"
      ],
      "expected": {
        "graphemes": 11,
        "code_points": 11,
        "utf16_units": 11,
        "utf8_bytes": 11
      }
    },
    {
      "id": "precomposed-accent",
      "text": "é",
      "code_points": [
        "U+00E9"
      ],
      "expected": {
        "graphemes": 1,
        "code_points": 1,
        "utf16_units": 1,
        "utf8_bytes": 2
      }
    },
    {
      "id": "combining-accent",
      "text": "é",
      "code_points": [
        "U+0065",
        "U+0301"
      ],
      "expected": {
        "graphemes": 1,
        "code_points": 2,
        "utf16_units": 2,
        "utf8_bytes": 3
      }
    },
    {
      "id": "grinning-face",
      "text": "😀",
      "code_points": [
        "U+1F600"
      ],
      "expected": {
        "graphemes": 1,
        "code_points": 1,
        "utf16_units": 2,
        "utf8_bytes": 4
      }
    },
    {
      "id": "five-emoji",
      "text": "😀😀😀😀😀",
      "code_points": [
        "U+1F600",
        "U+1F600",
        "U+1F600",
        "U+1F600",
        "U+1F600"
      ],
      "expected": {
        "graphemes": 5,
        "code_points": 5,
        "utf16_units": 10,
        "utf8_bytes": 20
      }
    },
    {
      "id": "six-emoji",
      "text": "😀😀😀😀😀😀",
      "code_points": [
        "U+1F600",
        "U+1F600",
        "U+1F600",
        "U+1F600",
        "U+1F600",
        "U+1F600"
      ],
      "expected": {
        "graphemes": 6,
        "code_points": 6,
        "utf16_units": 12,
        "utf8_bytes": 24
      }
    },
    {
      "id": "us-flag",
      "text": "🇺🇸",
      "code_points": [
        "U+1F1FA",
        "U+1F1F8"
      ],
      "expected": {
        "graphemes": 1,
        "code_points": 2,
        "utf16_units": 4,
        "utf8_bytes": 8
      }
    },
    {
      "id": "lf-line-break",
      "text": "A\nB",
      "code_points": [
        "U+0041",
        "U+000A",
        "U+0042"
      ],
      "expected": {
        "graphemes": 3,
        "code_points": 3,
        "utf16_units": 3,
        "utf8_bytes": 3
      }
    },
    {
      "id": "three-spaces",
      "text": "   ",
      "code_points": [
        "U+0020",
        "U+0020",
        "U+0020"
      ],
      "expected": {
        "graphemes": 3,
        "code_points": 3,
        "utf16_units": 3,
        "utf8_bytes": 3
      }
    }
  ]
}
