Code page 437(CCSID437) is thecharacter setof the originalIBM PC(personal computer).[2]It is also known as CP437, OEM-US, OEM 437,[3]PC-8,[4]or DOS Latin US.[5]The set includes all printableASCIIcharacters as well as some accented letters (diacritics), Greek letters, icons, and line-drawing symbols. It is sometimes referred to as the "OEM font" or "high ASCII", or as "extended ASCII"[4](one of many mutually incompatible ASCII extensions).
This character set remains the primary set in the core of anyEGAandVGA-compatible graphics card. As such, text shown when a PC reboots, before fonts can be loaded and rendered, is typically rendered using this character set.[note 1]Many file formats developed at the time of the IBM PC are based on code page 437 as well.
All these display adapters have text modes in which each character cell contains an8-bitcharactercode point(seedetails), 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.
A legacy of code page 437 is the number combinations used in WindowsAlt codes.[6][7][8]A DOS user could enter a character by holding down theAlt keyand entering the character code on thenumpad[6]and many users memorized the numbers needed for CP437 (or for the similarCP850). Although Microsoft Windows used different character sets such asCP1252,the original numbers were emulated so users could continue to use them; Microsoft added the ability to type a code from the Windows character set by typing 0 before the digits.[6][9]
The following tables show code page 437. Each character is shown with its equivalentUnicodecode point (when it is not equal to the character's code). Atooltip,generally available only when one points to the immediate left of the character, shows the Unicode code point name and the decimalAlt 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, someAPIswill not print some code points, in particular the range 0-31 and the code at 127.[10]Instead, they will interpret them as control characters. For instance, many methods of outputting text on the original IBM PC would interprethexcodes 07, 08, 0A and 0D asBEL,BS,LFandCR,respectively. 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.
^0 draws a blank space, but usage as theC stringterminator means it is more accurately translated as NUL. In their code-page-437-based implementation of C0-region graphics,Star Micronicsprinters re-purpose this code as aslashed zero.[15]
^Mapping as shown, to the beamedquavers[U+266B, ♫], follows data provided by theUnicode Consortium.[16]In IBM's GCGID (Graphic Character Global IDentifier) system of character IDs, this is SM910000, simply annotated as "Two Musical Notes";[12][13]however, the reference glyph shows two beamedsemiquavers[U+266C, ♬].[12]In the specification forIBM Japanese Host code,SM910080 (i.e. SM910000 with thefullwidthattribute set) is explicitly mapped to U+266C, and accordingly shows two semiquavers.[17]
^124 (7Chex) The actual glyph at this position is abroken bar[U+00A6, ¦] in the originalIBM PCandcompatiblesfont, as rendered by the originalMDA.This rendering was later adopted forCGA,EGAandVGA(see image at the beginning of the article). However, almost all software assumes this code is the ASCII character [U+007C, |]; for example, programming languages use it as "or". In the early 1990s, it was clarified[by whom?]that there is vertical bar inASCIIat this position and that the broken bar symbol is not part of ASCII.
^127 (7Fhex) is a "house" but was also sometimes used as Greek capitaldelta[U+0394, Δ].
^Could also serve as an integral extension [U+23AE, ⎮] in IBM's font.
^Comparison of characters in the E0 to EF range across various IBM products.225 (E1hex) is identified by IBM as Latin "Sharp sSmall "[13][U+00DF, ß] but is sometimes rendered inOEM fontsas Greek smallbeta[U+03B2, β]. The placement of this Latin character among Greek characters suggests intended multi-use.
^227 (E3hex) is identified by IBM as Greek "PiSmall "[U+03C0, π] but is sometimes rendered in OEM fonts as Greek capital pi [U+03A0, Π] or then-aryproductsign [U+220F, ∏].
^228 (E4hex) is identified by IBM as Greek "SigmaCapital "[U+03A3, Σ] but is also used as then-arysummationsign [U+2211, ∑].
^230 (E6hex) is identified by IBM as Greek "MuSmall "[U+03BC, μ] but is also used as themicro sign[U+00B5, µ]. In Unicode, IBM's Greek GCGID table[18]maps the character in this code page to the Greek letter, butPython,for example, maps it to the micro sign.
^233 (E9hex) is identified by IBM as Greek "ThetaCapital "[U+0398, Θ].[12][13]However, these symbols are for mathematics and physics, in which lowercase theta is much more commonly used (e.g. for polar coordinates).
^234 (EAhex) is identified by IBM as Greek "OmegaCapital "[U+03A9, Ω] but is also used as theohmsign [U+2126, Ω]. Unicode considers the characters to be equivalent and suggests that U+03A9 be used in both contexts.[19]
^235 (EBhex) is identified by IBM as Greek "DeltaSmall "[U+03B4, δ]. It was also unofficially used for the smalleth[U+00F0, ð] and thepartial derivativesign [U+2202, ∂]
^237 (EDhex) is identified by IBM as Greek "PhiSmall (Closed Form) "[U+03D5, ϕ; or, from the italicized math set, U+1D719, 𝜙] but, in somecodecs(e.g. the codec library ofPython[20]), is mapped to Unicode as the open (or "loopy" ) form [U+03C6, φ]. Comparison of IBM's Greek GCGID table[18]with Unicode's Greek code chart[21]shows where IBM, for example, reversed the open and closed forms when mapping to Unicode. This character is also used as theempty setsign [U+2205, ∅], thediametersign [U+2300, ⌀], and theLatin letter O with stroke[U+00D8, Ø; and U+00F8, ø].
^238 (EEhex) is identified by IBM as Greek "EpsilonSmall "[U+03B5, ε] but is sometimes rendered in OEM fonts as theelement-ofsign [U+2208, ∈]. It was often used as theeuro sign[U+20AC, €]
^244 (F4hex) and 245 (F5hex) are the upper and lower portion of theintegral symbol(∫), and they can be extended with the character 179 (B3hex), the vertical line of the box drawing block. 244 could also be used for thelong scharacter [U+017F, ſ].
^249 (F9hex) and 250 (FAhex) are almost indistinguishable: the first is a slightly larger dot than the second, both were used asbullets,middle dot,andmultiplication dot[U+2219, ∙]
^251 (FBhex) was also sometimes used as acheck mark[U+2713, ✓].
^255 (FFhex) draws a blank space; the use as non-breaking space (NBSP) has precedent inword processorsdesigned for the IBM PC.
The repertoire of code page 437 was taken from the character set ofWangword-processing machines, according toBill Gatesin an interview with Gates andPaul Allenthat appeared in the 2 October 1995 edition ofFortune Magazine:
"... We were also fascinated by dedicated word processors from Wang, because we believed that general-purpose machines could do that just as well. That's why, when it came time to design the keyboard for the IBM PC, we put the funny Wang character set into the machine—you know, smiley faces and boxes and triangles and stuff. We were thinking we'd like to do a clone of Wang word-processing software someday."
According to an interview withDavid J. Bradley(developer of the PC'sROM-BIOS) the characters were decided upon during a four-hour meeting on a plane trip from Seattle to Atlanta by Andy Saenz (responsible for the video card), Lew Eggebrecht (chief engineer for the PC) and himself.[22]
The selection of graphic characters has some internal logic:
Table rows 0 and 1, codes 0 to 31 (00hexto 1Fhex), are assorteddingbats(complementary and decorative characters). The isolated character 127 (7Fhex) also belongs to this group.
Table rows 2 to 7, codes 32 to 126 (20hexto 7Ehex), are the standardASCIIprintable characters.
Table rows 8 to 10, codes 128 to 175 (80hexto AFhex), are a selection of international text characters.
Table rows 11 to 13, codes 176 to 223 (B0hexto DFhex), arebox drawingandblockcharacters. This block is arranged so that characters 192 to 223 (C0hexto DFhex) contain all the right arms and right-filled areas. The originalIBM PCMDAdisplay adapter stored the code page 437 characterglyphsasbitmapseightpixelswide, but for visual enhancement displayed them every nine pixels on screen. This range of characters had the eighth pixel column duplicated by special hardware circuitry,[23]thus filling in gaps in lines and filled areas. The VGA adapter allows this behaviour to be turned on or off.[24]
Table rows 14 and 15, codes 224 to 254 (E0hexto FEhex) are devoted to mathematical symbols, where the first twelve are a selection of Greek letters commonly used in physics.
Most fonts forMicrosoft Windowsinclude the special graphic characters at the Unicode indexes shown, as they are part of theWGL4set that Microsoft encourages font designers to support. (The monospaced raster font familyTerminalwas an early font that replicated all code page 437 characters, at least at some resolutions.) To draw these characters directly from these code points, aMicrosoft Windowsfont called MS Linedraw[25]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.[26]
Code page 1055,also known as HP symbol set 0L,[27]is a subset which includes the box-drawing, half-blocks, black circles (the black circle replaces the bullet, which replaces the middle dot in this code page), and black square, and moves them to the upper half; the space is also included.[28]
Code page 437 has a series of international characters, mainly values 128 to 175 (80hexto AFhex). However, it only covers a few major Western European languages in full, includingEnglish,GermanandSwedish,[note 2]and so lacks several characters (mostly capital letters) important to many major Western European languages:
Danish/Norwegian:Ø and ø. Character number 237 (EDhex), the small phi (closed form), could be used as a surrogate even though it may not render well (furthermore, it tends to map to Unicode, and/or render in Unicode fonts, as the open-form phi or the closed-vertical-form phi, which are even further from the O with stroke). To compensate, theDanish/NorwegianandIcelandiccode pages (865and861) replaced cent sign (¢) with ø and the yen sign (¥) with Ø.
MostGreek Alpha betsymbols were omitted, beyond the basic math symbols. (They were included in the Greek-language code pages737and869.Some of the Greek symbols that were already in code page 437 had their glyphs changed from mathematical or scientific forms to match the actual use in Greek.)
Along with thecent(¢),pound sterling(£) andyen/yuan(¥) currency symbols, it has a couple of former European currency symbols: theflorin(ƒ, Netherlands) and thepeseta(₧, Spain). 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 theIBM electric typewriter,however, also had a single position devoted to it.
Later DOS character sets, such ascode page 850(DOS Latin-1),code page 852(DOS Central-European) andcode page 737(DOS Greek), 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 (e.g.horizontal double/vertical single). All code page 437 characters have similar glyphs inUnicodeand in Microsoft'sWGL4character set, and therefore are available in most fonts inMicrosoft Windows,and also in the default VGA font of theLinuxkernel, and theISO 10646fonts forX11.
^Systems available in Eastern European, Arabic, and Asian countries often use a different set; however, these sets are designed to match 437 as much as possible. The designation "OEM", for "original equipment manufacturer", indicates that the set could be changed by the manufacturer to meet different markets.
^It also covers some less major Western European languages—as well as some other languages—in full, includingBasque,Malay,and the pre-1999TurkmenLatin Alpha bet,but this was likely unintended.
^Edwards, Benj (6 November 2015) [2011]."Origins of the ASCII Smiley Character: An Email Exchange With Dr. David Bradley".Archivedfrom the original on 28 November 2016.Retrieved27 November2016.If you look at the first 32 characters in theIBM PCcharacter set you'll see lots of whimsical characters — smiley face, musical notes, playing card suits and others. These were intended for character based games [...] Since we were using 8-bit characters we had 128 new spots to fill. We put serious characters there — three columns of foreign characters, based on ourDatamasterexperience. Three columns of block graphic characters [...] many customers with Monochrome Display Adapter would have no graphics at all. [...] two columns had math symbols, greek letters (for math) and others [...] about the first 32 characters (x00-x1F)? [...] These characters originated with teletype transmission. But we could display them on the character based screens. So we added a set of "not serious" characters. They were intended as display only characters, not for transmission or storage. Their most probable use would be in character based games. [...] As in most things for the IBM PC, the one year development schedule left little time for contemplation and revision. [...] the character set was developed in a three person 4-hour meeting, and I was one of those on that plane from Seattle to Atlanta. There was some minor revision after that meeting, but there were many other things to design/fix/decide so that was about it. [...] the other participants in that plane trip were Andy Saenz — responsible for the video card, and Lew Eggebrecht — the chief engineer for the PC.
^Wilton, Richard (December 1987).Programmer's Guide to PC & PS/2 Video Systems: Maximum Video Performance Form the EGA, VGA, HGC, and MCGA(1st ed.).Microsoft Press.ISBN1-55615-103-9.