Code page 437


Code page 437 is the character set of the original IBM PC. It is also known as CP437, OEM-US, OEM 437, PC-8, or DOS Latin US. The set includes all printable ASCII characters, extended codes for accented letters, some Greek letters, icons, and line-drawing symbols. It is sometimes referred to as the "OEM font" or "high ASCII", or as "extended ASCII".
This character set remains the primary font in the core of any EGA and VGA-compatible graphics card. Text shown when a PC reboots, before any other font can be loaded from a storage medium, typically is rendered in this character set. Many file formats developed at the time of the IBM PC are based on code page 437 as well.

Display adapters

The original IBM PC contained this font as a 9×14 pixels-per-character font stored in the ROM of the IBM Monochrome Display Adapter and an 8×8 pixels-per-character font of the Color Graphics Adapter cards. The IBM Enhanced Graphics Adapter contained an 8×14 pixels-per-character version, and the VGA contained a 9×16 version.
All these display adapters have text modes in which each character cell contains an 8-bit character code point, giving 256 possible values for graphic characters. All 256 codes were assigned a graphical character in ROM, including the codes from 0 to 31 that were reserved in ASCII for non-graphical control characters.
Various Eastern European PCs used different character sets, sometimes user-selectable via jumpers or CMOS setup. These sets were designed to match 437 as much as possible, for instance sharing the code points for many of the line-drawing characters, while still allowing text in a local language to be displayed.

Alt codes

A legacy of code page 437 is the number combinations used in Windows Alt keycodes. The user could enter a character by holding down the Alt key and entering the three-digit decimal Alt keycode on the numpad and many users memorized the numbers needed for CP437. When Microsoft switched to their proprietary character sets and later Unicode in Windows, the original codes were retained; Microsoft added the ability to type a code in the new character set by typing the numpad 0 before the digits.

Character set

The following tables show code page 437. Each character is shown with its equivalent Unicode code point and its decimal Alt code. See also the notes below, as there are multiple equivalent Unicode characters for some code points.
Although the ROM provides a graphic for all 256 different possible 8-bit codes, some APIs will not print some code points, in particular the range 0-31 and the code at 127. Instead, they will interpret them as control characters. For instance, many methods of outputting text on the original IBM PC would interpret the codes for BEL, BS, CR and LF. Many printers were also unable to print these characters.
When translating to Unicode some codes do not have a unique, single Unicode equivalent; the correct choice may depend upon context.

History

The repertoire of code page 437 was taken from the character set of Wang word-processing machines, according to Bill Gates in an interview with Gates and Paul Allen that appeared in the 2 October 1995 edition of Fortune Magazine:
According to an interview with David J. Bradley the characters were decided upon during a four-hour meeting on a plane trip from Seattle to Atlanta by Andy Saenz, Lew Eggebrecht and himself.
The selection of graphic characters has some internal logic:
Most fonts for Microsoft Windows include the special graphic characters at the Unicode indexes shown, as they are part of the WGL4 set that Microsoft encourages font designers to support. To draw these characters directly from these code points, a Microsoft Windows font called MS Linedraw replicates all of the code page 437 characters, thus providing one way to display DOS text on a modern Windows machine as it was shown in DOS, with limitations.

Internationalization

Code page 437 has a series of international characters, mainly values 128 to 175. However, it only covers a few major Western European languages in full, including English, German and Swedish, and so lacks several characters important to many major Western European languages:
Along with the cent, pound sterling and yen/yuan currency symbols, it has a couple of former European currency symbols: the florin and the peseta. The presence of the last is unusual, since the Spanish peseta was never an internationally relevant currency, and also never had a symbol of its own; it was simply abbreviated as "Pt", "Pta", "Pts", or "Ptas". Spanish models of the IBM electric typewriter, however, also had a single position devoted to it.
Later DOS character sets, such as code page 850, code page 852 and code page 737, filled the gaps for international use with some compatibility with code page 437 by retaining the single and double box-drawing characters, while discarding the mixed ones. All code page 437 characters have similar glyphs in Unicode and in Microsoft's WGL4 character set, and therefore are available in most fonts in Microsoft Windows, and also in the default VGA font of the Linux kernel, and the ISO 10646 fonts for X11.