Skip to content

TextDecodingName

TextDecodingName = TextEncodingName | "windows-1252" | "shift_jis"

Defined in: packages/core/src/buffer/text/text-encoding-name.ts:36

Text encodings decodeText reads: every TextEncodingName, plus two legacy encodings it can decode but encodeText cannot write.

"windows-1252" is the Western European code page that the WHATWG Encoding Standard decodes every Latin-1 label as. "shift_jis" is the Japanese double-byte encoding; decoding it needs a TextDecoder with ICU’s legacy encodings, which browsers, Deno, Bun and Node’s default full-ICU builds have, and a small-icu Node build lacks.