{
  "slug": "unicode-scalar-value",
  "term": "Unicode scalar value",
  "aliases": [],
  "definition": "A Unicode scalar value is a code-point value from U+0000 to U+10FFFF outside the surrogate range U+D800 to U+DFFF.",
  "note": "Range: Scalar values include assigned characters, unassigned code points and noncharacters, but exclude surrogates. Membership in this range does not mean that a value is assigned to a character or permitted by a particular filename or interchange profile. [unicode-scalars]\n\nRepresentation: UTF-8 uses one to four octets per scalar value. UTF-16 uses one code unit for a non-surrogate value in the Basic Multilingual Plane and a surrogate pair for a supplementary value. U+1F600 is one scalar value, four UTF-8 bytes and two UTF-16 code units; either half of its pair alone is not a scalar value. [unicode-scalars] [rfc-utf8]\n\nText units: U+0065 followed by U+0301 contains two scalar values but one default extended grapheme cluster. Counting scalar values therefore differs from both storage-byte budgeting and user-facing text segmentation. Validate input before counting: replacement decoding can conceal distinctions between malformed byte sequences. [unicode-graphemes] [rfc-utf8]",
  "limitations": [
    "Scalar validity does not establish normalization, filename equality or successful recovery."
  ],
  "related": [
    "utf-32",
    "character-encoding",
    "utf-8",
    "grapheme-cluster"
  ],
  "citations": [
    {
      "id": "unicode-scalars",
      "title": "Unicode 17.0: chapter 3, section 3.9, D76-D79 and UTF-16",
      "url": "https://www.unicode.org/versions/Unicode17.0.0/core-spec/chapter-3/",
      "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": "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": "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": [
    "Source-reviewed definition; constructed runtime examples are separate from the article's earlier filesystem observations."
  ],
  "status": "shipping",
  "advantages": [],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-20"
}
