- Code page 437
-
IBM PC or MS-DOS code page 437, often abbreviated CP437 and also known as DOS-US, OEM-US or sometimes misleadingly referred to as the OEM font, High ASCII or Extended ASCII,[1][2] is the character set of the original IBM PC.
In a strict sense, this character set was not born as a code page but was simply the graphical glyph repertoire available in the 9 by 14 pixels-per-character font of the IBM Monochrome Display Adapter (MDA) and the 8 by 8 pixels-per-character font of the Color Graphics Adapter (CGA) cards of the original IBM PC. The ROM of the IBM Enhanced Graphics Adapter (EGA) has an 8 by 14 pixels-per-character version and the VGA adapter expanded the character cell to 9 by 16 for the finer VGA resolution. Today, the character set is still the primary font in the core of any EGA and VGA compatible graphic card; i.e. the text you can see on screen when a PC reboots, before any other font can be loaded from a storage medium, is rendered with this "code page".
All these display adapters have text modes in which each character cell contains an 8-bit character code point (see details), giving 256 possible values for graphic characters. This way, beyond the original ASCII graphical character set (values 32dec to 126dec, 95 in total), the implementors put in ROM a handful of miscellaneous characters even for the range 0dec to 31dec, reserved in ASCII for control (non graphical) purposes.
The code page has two main uses: as an information interchange code (through files and telecom), in which the values 0dec to 127dec plays the same role as in ASCII plus the international text characters 128dec to 175dec (see the table below), and as a graphical resource for screen and printers (by merely writing in the video RAM character cell/sending through line the appropriate code), in which the full range can be used to build fine presentations.
Contents
Characters
The following is a table representing CP437 using equivalent Unicode characters (see notes below as there are multiple equivalent Unicode characters for some cells).
For many uses, the codes in the range 0dec to 31dec and the code 127dec will not produce these symbols. Some (or all) of them will be interpreted as ASCII control characters. For instance sending the code 13dec to a terminal or printer is very likely to produce a carriage return and not an eighth-note symbol.
Most fonts for Microsoft Windows include these glyphs at the Unicode indexes shown, as they are part of the WGL4 set that Microsoft encourages font designers to support (the monospaced raster font family Terminal was an early font that replicated all CP437 characters, at least at some resolutions). To draw these glyphs directly from these code values, a Microsoft Windows font called MS Linedraw[3] replicates all of the CP437 characters, thus providing one way to display DOS text on a contemporary Windows machine as it was shown in DOS, with limitations.[4]
CP437 −0 −1 −2 −3 −4 −5 −6 −7 −8 −9 −A −B −C −D −E −F
0−
NUL
0000
0☺
263A
1☻
263B
2♥
2665
3♦
2666
4♣
2663
5♠
2660
6•
2022
7◘
25D8
8○
25CB
9◙
25D9
10♂
2642
11♀
2640
12♪
266A
13♫
266B
14☼
263C
15
1−
►
25BA
16◄
25C4
17↕
2195
18‼
203C
19¶
00B6
20§
00A7
21▬
25AC
22↨
21A8
23↑
2191
24↓
2193
25→
2192
26←
2190
27∟
221F
28↔
2194
29▲
25B2
30▼
25BC
31
2−
SP
0020
32!
0021
33"
0022
34#
0023
35$
0024
36%
0025
37&
0026
38'
0027
39(
0028
40)
0029
41*
002A
42+
002B
43,
002C
44-
002D
45.
002E
46/
002F
47
3−
0
0030
481
0031
492
0032
503
0033
514
0034
525
0035
536
0036
547
0037
558
0038
569
0039
57:
003A
58;
003B
59<
003C
60=
003D
61>
003E
62?
003F
63
4−
@
0040
64A
0041
65B
0042
66C
0043
67D
0044
68E
0045
69F
0046
70G
0047
71H
0048
72I
0049
73J
004A
74K
004B
75L
004C
76M
004D
77N
004E
78O
004F
79
5−
P
0050
80Q
0051
81R
0052
82S
0053
83T
0054
84U
0055
85V
0056
86W
0057
87X
0058
88Y
0059
89Z
005A
90[
005B
91\
005C
92]
005D
93^
005E
94_
005F
95
6−
`
0060
96a
0061
97b
0062
98c
0063
99d
0064
100e
0065
101f
0066
102g
0067
103h
0068
104i
0069
105j
006A
106k
006B
107l
006C
108m
006D
109n
006E
110o
006F
111
7−
p
0070
112q
0071
113r
0072
114s
0073
115t
0074
116u
0075
117v
0076
118w
0077
119x
0078
120y
0079
121z
007A
122{
007B
123|
007C
124}
007D
125~
007E
126⌂
2302
127
8−
Ç
00C7
128ü
00FC
129é
00E9
130â
00E2
131ä
00E4
132à
00E0
133å
00E5
134ç
00E7
135ê
00EA
136ë
00EB
137è
00E8
138ï
00EF
139î
00EE
140ì
00EC
141Ä
00C4
142Å
00C5
143
9−
É
00C9
144æ
00E6
145Æ
00C6
146ô
00F4
147ö
00F6
148ò
00F2
149û
00FB
150ù
00F9
151ÿ
00FF
152Ö
00D6
153Ü
00DC
154¢
00A2
155£
00A3
156¥
00A5
157₧
20A7
158ƒ
0192
159
A−
á
00E1
160í
00ED
161ó
00F3
162ú
00FA
163ñ
00F1
164Ñ
00D1
165ª
00AA
166º
00BA
167¿
00BF
168⌐
2310
169¬
00AC
170½
00BD
171¼
00BC
172¡
00A1
173«
00AB
174»
00BB
175
B−
░
2591
176▒
2592
177▓
2593
178│
2502
179┤
2524
180╡
2561
181╢
2562
182╖
2556
183╕
2555
184╣
2563
185║
2551
186╗
2557
187╝
255D
188╜
255C
189╛
255B
190┐
2510
191
C−
└
2514
192┴
2534
193┬
252C
194├
251C
195─
2500
196┼
253C
197╞
255E
198╟
255F
199╚
255A
200╔
2554
201╩
2569
202╦
2566
203╠
2560
204═
2550
205╬
256C
206╧
2567
207
D−
╨
2568
208╤
2564
209╥
2565
210╙
2559
211╘
2558
212╒
2552
213╓
2553
214╫
256B
215╪
256A
216┘
2518
217┌
250C
218█
2588
219▄
2584
220▌
258C
221▐
2590
222▀
2580
223
E−
α
03B1
224ß
00DF
225Γ
0393
226π
03C0
227Σ
03A3
228σ
03C3
229µ
00B5
230τ
03C4
231Φ
03A6
232Θ
0398
233Ω
03A9
234δ
03B4
235∞
221E
236φ
03C6
237ε
03B5
238∩
2229
239
F−
≡
2261
240±
00B1
241≥
2265
242≤
2264
243⌠
2320
244⌡
2321
245÷
00F7
246≈
2248
247°
00B0
248∙
2219
249·
00B7
250√
221A
251ⁿ
207F
252²
00B2
253■
25A0
254NBSP
00A0
255−0 −1 −2 −3 −4 −5 −6 −7 −8 −9 −A −B −C −D −E −F Along with the characters in the range 0dec to 31dec (00hex to 1Fhex), which can be interpreted as ASCII controls as well as graphical dingbats, some characters have overloaded meanings. Implementers of translation to Unicode should note that these codes do not have a unique, single Unicode equivalent and the correct choice depends upon context:
- 0 and 255dec (FFhex) both draw a blank space, as does 32dec (20hex). The use of 255dec for U+00A0 Non-breaking space (NBSP) has some precedent in word processors designed for the IBM PC.
- 225dec (E1hex) is both the German sharp S (U+00DF, ß) and the Greek lowercase beta (U+03B2, β).
- 227dec (E3hex) is the Greek lowercase pi (U+03C0, π), but early fonts such as Terminal use a variant of pi that is ambiguous in case, and therefore can be used for the Greek capital pi (U+03A0, Π) or the n-ary product sign (U+220F, ∏).
- 228dec (E4hex) is both the n-ary summation sign (U+2211, ∑) and the Greek uppercase sigma (U+03A3, Σ).
- 230dec (E6hex) is both the micro sign (U+00B5, µ) and the Greek lowercase mu (U+03BC, μ).
- 234dec (EAhex) is both the ohm sign (U+2126, Ω) and the Greek uppercase omega (U+03A9, Ω). (Unicode considers the ohm sign to be equivalent to uppercase omega, and suggests that the latter be used in both contexts.[5]).
- 235dec (EBhex) is the Greek lowercase delta (U+03B4, δ), but it has also been used as a surrogate for the Icelandic lowercase eth (U+00F0, ð) and the partial derivative sign (U+2202, ∂).
- 237dec (EDhex) is supposed to be used as Greek lowercase phi, but is mainly used as the empty set sign (U+2205, ) and was also used as the Greek phi symbol in italics (U+03D5, ) to name angles, diameter sign (U+2300, ), and as a surrogate for the Latin lowercase O with stroke (U+00F8, ø).
- 238dec (EEhex) is both the Greek lowercase epsilon (U+03B5, ε) and the element-of sign (U+2208, ∈). Later it was often used for the euro sign (U+20AC, €).
Entry on keyboards
In DOS and Windows, most characters from the currently active DOS code page can be inserted by holding down the Alt key and entering the character's three-digit decimal code on the numpad. This technique is called Windows Alt keycodes. One can find out which DOS code page is currently active by issuing the DOS command
mode
con
orchcp
.Difference from ASCII
CP437 is based on ASCII, with the following modifications:
- Codes from the C0 control range (00hex to 1Fhex) and ASCII DEL (7Fhex) can assume their original function as control characters, but also function as graphic symbols when displayed in text mode from the screen buffer. For example, DEL and most of the C0 control codes are displayed graphically in a screen editor like MS-DOS Editor or when written to the screen via the DOS type command. The graphics include smiling faces, card suits, and musical notes. Code 127dec (7Fhex), DEL, shows as a "house". This behavior is not specific to CP437, but shared by all DOS code pages and so-called Windows OEM code pages, which generally resemble CP437.
- The high-bit range, 128dec to 255dec (80hex to FFhex), is mapped to various symbols: a few European characters (accented Latin letters, etc.) in no particular order and not sufficient for representation of most Western European languages; box drawing characters; mathematical symbols; and a few Greek letters commonly used in mathematics and physics.
The repertoire of CP437 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:
- "... 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."
The selection of graphic characters, often called bizarre,[citation needed] has some internal logic:
- Table rows 0 and 1, codes 0dec to 31dec (00hex to 1Fhex), are assorted dingbats (complementary and decorative characters). The isolated character 127dec (7Fhex) also belongs to this group.
- Table rows 2 to 7 (except character 127dec, 7Fhex), codes 32dec to 126dec (20hex to 7Ehex), are the standard ASCII printable characters.
- Table rows 8dec to 10dec (8hex to Ahex), codes 128dec to 175dec (80hex to AFhex), are a selection of international text characters.
- Table rows 11dec to 13dec (Bhex to Dhex), codes 176dec to 223dec (B0hex to DFhex), are box drawing and block characters. This block is arranged so that characters 192dec to 223dec (C0hex to DFhex) of the rows 12dec and 13dec (Chex and Dhex) have all right arms (except 217dec, D9hex) or right filled areas (except 221dec, DDhex), and this is due to the following technical reason:[6] the original IBM PC MDA display adapter stored the CP437 character glyphs as bitmaps eight pixels wide, but for visual enhancement displayed them every nine pixels on screen (eight plus an additional gap). Thus characters with connections at their right edge had to duplicate their eighth pixels to avoid visual interruptions in the designs built up with them. This pixel extension is done by special hardware circuitry, and only this character subset is affected.
- Table rows 14dec and 15dec (Ehex and Fhex), codes 224dec to 255dec (E0hex to FFhex) are devoted to mathematical symbols, where the first twelve are a selection of Greek letters commonly used in physics. Characters 244dec (F4hex) and 245dec (F5hex) are the upper and lower portion of an italic long S, the symbol used as the integral sign (∫), and they can be extended with the character 179dec (B3hex), the vertical line of the box drawing block. Characters 249dec (F9hex) and 250dec (FAhex) are almost indistinguishable: the first is slightly larger than the second, which resembles the typographic middle dot (·). The character 255 (FFhex) is merely blank, and acts as a kind of non-breaking space in order to arrange math formulae.
Internationalization
CP437 has a series of international characters, mainly values 128dec to 175dec (80hex to AFhex). However, it lacks many characters important to several Western languages:
- Spanish (Á, Í, Ó, Ú), French (À, Â, È, Ê, Ë, Ì, Î, Ï, Ô, Œ, œ, Ù, Û), and Portuguese (Ã, ã, Õ, õ).
- German sharp S (ß) shares its code point with the beta symbol (β).
- Scandinavian lacks Ø and ø. Character number 237dec (EDhex), the empty set symbol, could be used as a surrogate, but its spacing is awkward for display within a word. To compensate, the Norwegian and Danish code pages (CP865 and CP861), replaced cent (¢) with ø, and yen (¥) with Ø.
- Most Greek alphabet symbols. (They were included in the Greek-language code pages CP737 and CP869.)
Along with the cent (¢), pound sterling (£) and yen/yuan (¥) currency symbols, it has a couple of European currency symbols: the florin (ƒ, Netherlands) and the peseta (₧, 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 the IBM electric typewriter, however, also had a single position devoted to it.
Later MS-DOS character sets, such as CP850 (DOS Latin-1), CP852 (DOS Central-European) and CP737 (DOS Greek), filled the gaps for international use with some compatibility with CP437 by retaining the single and double box-drawing characters, while discarding the mixed ones (e.g. horizontal double/vertical single). All CP437 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.
See also
- Alt codes
- ANSI
- ANSI art
- ASCII
- ASCII art
- Semi graphical characters
- Western Latin character sets (computing)
- Terminal (typeface)
References
- ^ The Extended ASCII Chart
Note: CP437 is an extended ASCII code page, but is not the extended ASCII, because numerous incompatible extensions exist. - ^ OEM font Definition
- ^ MS LineDraw - Version 2.00
- ^ WD97: MS LineDraw Font Not Usable in Word
- ^ The Unicode Consortium, The Unicode Standard 4.0, Chapter 7, "European Alphabetic Scripts", p176. PDF version
- ^ Richard Wilton, Programmer's Guide to PC & PS/2 Video Systems, 1987, Microsoft Press.
External links
- Microsoft Code Page 437 reference chart
- IBM Code Page 437 reference chart
- cp437_DOSLatinUS to Unicode table on official Unicode site
- IBM PC memory-mapped video graphics to Unicode on official Unicode site
Character encodings Character sets Early telecommunications ASCII · ISO/IEC 646 · ISO/IEC 6937 · T.61 · sixbit code pages · Baudot code · Morse code · Chinese telegraph codeISO/IEC 8859 Bibliographic use National standards ArmSCII · CNS 11643 · GOST 10859 · GB 2312 · HKSCS · ISCII · JIS X 0201 · JIS X 0208 · JIS X 0212 · JIS X 0213 · KPS 9566 · KS X 1001 · PASCII · TIS-620 · TSCII · VISCII · YUSCIIEUC CN · JP · KR · TWISO/IEC 2022 CN · JP · KR · CCCIIMacOS codepages ("scripts") DOS codepages Windows codepages EBCDIC codepages 37/1140 · 273/1141 · 277/1142 · 278/1143 · 280/1144 · 284/1145 · 285/1146 · 297/1147 · 420/16804 · 424/12712 · 500/1148 · 838/1160 · 871/1149 · 875/9067 · 930/1390 · 933/1364 · 937/1371 · 935/1388 · 939/1399 · 1025/1154 · 1026/1155 · 1047/924 · 1112/1156 · 1122/1157 · 1123/1158 · 1130/1164 · JEF · KEISPlatform specific ATASCII · CDC display code · DEC-MCS · DEC Radix-50 · Fieldata · GSM 03.38 · HP roman8 · PETSCII · TI calculator character sets · WISCII · ZX Spectrum character setUnicode / ISO/IEC 10646 Miscellaneous codepages Related topics control character (C0 C1) · CCSID · Character encodings in HTML · charset detection · Han unification · ISO 6429/IEC 6429/ANSI X3.64 · mojibakeCategories:- DOS code pages
Wikimedia Foundation. 2010.