ConstBuild the 128-character lookup table for byte values 0x80–0xFF in a given code page.
Two strategies are tried in order:
data array — use the explicit character table bundled in
capabilities.json (each entry covers 16 characters; 8 entries total).python_encode
name via iconv-lite (requires the encoding to be supported).Encoding name or alias (e.g. "CP437").
Array of 128 single-character strings covering bytes 0x80–0xFF.
Retrieve the CodePageEntry for a given encoding name or alias.
Encoding name or alias (e.g. "CP437", "pc850").
The matching CodePageEntry from the capabilities database.
Resolve an encoding alias to its canonical name.
Handles common variants such as "pc437" → "CP437",
"latin1" → "ISO-8859-1". Unrecognised inputs are returned
uppercased without modification.
Encoding name or alias (case-insensitive).
Canonical encoding name as used in capabilities.json.
Code-page resolver and character-table builder.
Resolves encoding aliases, looks up encoding metadata from
capabilities.json, and builds the 128-character lookup table (byte values 0x80–0xFF) for any supported code page.