{
  "slug": "utf-32",
  "term": "UTF-32",
  "aliases": [
    "UTF32"
  ],
  "definition": "UTF-32 represents each Unicode scalar value using one 32-bit code unit, with a specified byte order when serialized.",
  "note": "Validity: Surrogate values U+D800 through U+DFFF and values above U+10FFFF are invalid UTF-32 units. Unassigned scalar values and noncharacters are not thereby malformed. [unicode32]\n\nSerialization: UTF-32BE and UTF-32LE fix byte order. Generic UTF-32 uses an initial byte-order mark when present and defaults to big-endian without one unless a higher-level protocol specifies otherwise. Under the explicit-endian schemes, an initial U+FEFF is content, not an automatically removed signature. [unicode32]\n\nCounting: Four bytes represent one scalar, not necessarily one displayed character. Storage size relative to UTF-8 depends on the text. Transcoding does not normalize equivalent spellings or establish filename equality. [utf-faq] [normalization]\n\nRecovery: The constructed bytes 00 00 01 00 decode as U+0100 in big-endian and U+10000 in little-endian. Both succeed; decoder acceptance alone cannot recover the intended byte order. Preserve the encoding contract with stored names. [hesela-utf32]\n\nDecoder choice: In CPython 3.12.3, BOM-less bytes.decode('utf-32') uses native byte order, while the generic incremental decoder rejects a complete BOM-less unit. An encoding label alone does not select an API's BOM policy. [python-utf32]",
  "status": "shipping",
  "advantages": [],
  "limitations": [
    "Fixed-width scalar units do not provide fixed-width grapheme clusters or validate a filesystem's filename rules."
  ],
  "related": [
    "character-encoding",
    "unicode-scalar-value",
    "byte-order",
    "utf-8",
    "grapheme-cluster",
    "unicode-normalization"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-20",
  "citations": [
    {
      "id": "unicode32",
      "title": "Unicode 17.0: chapter 3, D90 and D99-D101, UTF-32 forms and schemes",
      "url": "https://www.unicode.org/versions/Unicode17.0.0/core-spec/chapter-3/",
      "accessed": "2026-11-20"
    },
    {
      "id": "utf-faq",
      "title": "Unicode FAQ: UTF-8, UTF-16, UTF-32 and BOM",
      "url": "https://www.unicode.org/faq/utf_bom.html",
      "accessed": "2026-11-20"
    },
    {
      "id": "normalization",
      "title": "Unicode UAX 15 revision 57: canonical and compatibility normalization",
      "url": "https://www.unicode.org/reports/tr15/tr15-57.html",
      "accessed": "2026-11-20"
    },
    {
      "id": "hesela-utf32",
      "title": "Hesela: UTF-32 byte order and filename identity",
      "url": "https://hesela.com/analyses/filename-identity-backup-restores/#utf32-byte-order",
      "accessed": "2026-11-20"
    },
    {
      "id": "python-utf32",
      "title": "CPython 3.12.3: UTF-32 stateless and incremental decoder implementation",
      "url": "https://github.com/python/cpython/blob/v3.12.3/Lib/encodings/utf_32.py",
      "accessed": "2026-11-20"
    }
  ],
  "provenance": [
    "Source-reviewed terminology and constructed strict-codec examples, not filesystem observations.",
    "Executable examples and tests: https://hesela.dev/research/utf32-contracts/probe.py and https://hesela.dev/research/utf32-contracts/test_probe.py."
  ]
}
