{
  "slug": "character-encoding",
  "term": "Character encoding",
  "aliases": [
    "Text encoding"
  ],
  "definition": "A character encoding specifies how text is represented using coded values and their storage or interchange representation.",
  "note": "Layers: Unicode distinguishes code points, encoding forms that map scalar values to code units, and encoding schemes that serialize code units as bytes. UTF-8, UTF-16 and UTF-32 are different representations of Unicode text. A code point, code unit and byte are not interchangeable counting units. [unicode-encoding]\n\nCounting: UTF-8 stores U+0041 in one byte and U+20AC in three. A user-perceived character can contain several code points, so neither byte count nor code-point count is a universal display-character count. Specify the unit when sizing a text field or comparing names. [rfc-utf8] [unicode-graphemes]\n\nRecovery: Record the encoding and decoding-error policy with text-bearing metadata. Replacing undecodable input can discard distinctions in the original bytes; a readable display string is not automatically a reversible filename identifier. Keep the original representation when byte identity is required. [hesela-filenames]",
  "status": "shipping",
  "advantages": [],
  "limitations": [
    "An encoding label does not establish Unicode normalization, case-insensitive equality or a filesystem's filename comparison policy."
  ],
  "related": [
    "ascii",
    "utf-32",
    "utf-8",
    "unicode-normalization",
    "byte",
    "byte-order",
    "filename-collision",
    "unicode-scalar-value",
    "grapheme-cluster",
    "iso-8859-1",
    "windows-1252",
    "csv"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-21",
  "citations": [
    {
      "id": "unicode-encoding",
      "title": "Unicode 17.0.0: chapter 3, sections 3.9 and 3.10, encoding forms and schemes",
      "url": "https://www.unicode.org/versions/Unicode17.0.0/core-spec/chapter-3/",
      "accessed": "2026-11-17"
    },
    {
      "id": "rfc-utf8",
      "title": "RFC 3629: section 3, UTF-8 definition",
      "url": "https://www.rfc-editor.org/rfc/rfc3629.html#section-3",
      "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-filenames",
      "title": "Hesela: filename identity and backup restores",
      "url": "https://hesela.com/analyses/filename-identity-backup-restores/#text-encoding",
      "accessed": "2026-11-17"
    }
  ],
  "provenance": [
    "Source-reviewed terminology with constructed text examples, not storage-device measurements."
  ]
}
