Function: aliasPage()
ts
function aliasPage(claimedNames, targetName): CharsetPage;Defined in: packages/core/src/charset/alias.ts:20
A transliteration page that makes one charset name decode/encode as another — the one-line fix for mislabeled legacy columns (Jira MFF-4):
ts
// Columns DECLARED ISO8859_1 whose bytes are really win1252 (Delphi/CP1252):
connect({ charset: 'NONE', transliterations: [aliasPage('ISO8859_1', 'win1252')] })The target resolves through the built-in transliteration pages first (so 'win1252' rides the byte-faithful built-in codec), then falls back to iconv-lite — which is what makes multi-byte targets work too: aliasPage('ISO8859_1', 'shiftjis') for columns mislabeled around SJIS data. An unknown target throws immediately with both names, never silently falling back to a different encoding.
Parameters
| Parameter | Type |
|---|---|
claimedNames | string | string[] |
targetName | string |