Skip to content

Codepages and text encodings

Regardless of the source, JavaScript (JS) converts all the text it handles into UTF-16.

UTF-16 is based on Unicode and is compatible with UTF-8 and backward compatible with ISO-8859-1 and US-ASCII.

But otherwise, all other loaded text must be transcoded to accurately display the characters.

Character set Support About
US-ASCII1 Yes 4 The original text encoding of the Internet
CP-437 Mimic The most common encoding for ASCII, ANSI art, and text for PC and MS-DOS
CP-12522 Mimic The default English encoding for legacy Windows3 is backward compatible with ISO-8859-1
ISO-8859-1 Yes 4 The replacement for US-ASCII that supported two times the characters and was the default encoding for the Commodore Amiga and legacy Linux
ISO-8859-15 Mimic An update for ISO-8859-1 that added some missing characters such as the Euro sign
SHIFT JIS Yes 4 A legacy Japanese encoding used by Shift JIS art
UTF-8 Yes 4 The current standard encoding for modern HTML and most documents it supports over a hundred thousand characters
UTF-16 Yes 4 The Unicode implementation used by JavaScript and common for documents not written in the Latin alphabet
Yes 4 Encodings that are mistakenly used by Chromium when viewing ANSI and ASCII art

  1. Historically known as ANSI X3.4 or ISO 646. 

  2. Also called Windows-1252 or Windows ANSI. 

  3. Created in 1985 for Microsoft Windows 1.0, it was revised in multiple releases of Windows, including Windows 95 and 98. 

  4. The browser natively handles this character set.