Jump to content

Code page 437

From Wikipedia, the free encyclopedia
(Redirected from CP437)

Code page 437
Code page 437, as rendered by an IBM PC using standard VGA
MIME / IANAIBM437
Alias(es)cp437, 437, csPC8CodePage437,[1] OEM-US
LanguagesEnglish, German, Swedish
ClassificationExtended ASCII, OEM code page
ExtendsUS-ASCII
Other related encodingCode page 850,

Code page 437 (CCSID 437) is the character set of the original IBM PC (personal computer).[2] It is also known as CP437, OEM-US, OEM 437,[3] PC-8,[4] or MS-DOS Latin US.[5] The set includes all printable ASCII characters 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 any EGA and VGA-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.

Display adapters

[edit]

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 (MDA) and an 8×8 pixels-per-character font of the Color Graphics Adapter (CGA) cards.[citation needed] The IBM Enhanced Graphics Adapter (EGA) contained an 8×14 pixels-per-character version[6] and—for the CGA compatible modes—an 8x8 pixels-per-character version.[7]. The VGA contained a 9×16 version.[citation needed]

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. 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[which?] 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

[edit]

A legacy of code page 437 is the number combinations used in Windows Alt codes.[8][9][10] A DOS user could enter a character by holding down the Alt key and entering the character code on the numpad[8] and many users memorized the numbers needed for CP437 (or for the similar CP850). Although Microsoft Windows used different character sets such as CP1252, 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.[8][11]

Character set

[edit]

The following tables show code page 437. Each character is shown with its equivalent Unicode code point (when it is not equal to the character's code). A tooltip, generally available only when one points to the immediate left of the character, shows the Unicode code point name and the 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.[12] Instead, they will interpret them as control characters. For instance, many methods of outputting text on the original IBM PC would interpret hex codes 07, 08, 0A, and 0D as BEL, BS, LF, and CR, respectively. Many printers were also unable to print these characters.

Code page 437[13][14][15][16]
0 1 2 3 4 5 6 7 8 9 A B C D E F
0x
0
NUL[a] ☺︎
263A
☻
263B
♥︎
2665
♦︎
2666
♣︎
2663
♠︎
2660
•
2022
◘
25D8
○
25CB
◙
25D9
♂︎
2642
♀︎
2640
♪
266A
♫[b]
266B
☼
263C
1x
16
►
25BA
◄
25C4
↕︎
2195
‼︎
203C
00B6
§
00A7
▬
25AC
↨
21A8
↑
2191
↓
2193
→
2192
←
2190
∟
221F
↔︎
2194
▲
25B2
▼
25BC
2x
32
SP  ! " # $ % & ' ( ) * + , - . /
3x
48
0 1 2 3 4 5 6 7 8 9 : ; < = > ?
4x
64
@ A B C D E F G H I J K L M N O
5x
80
P Q R S T U V W X Y Z [ \ ] ^ _
6x
96
` a b c d e f g h i j k l m n o
7x
112
p q r s t u v w x y z { |[c] } ~ ⌂[d]
2302
8x
128
Ç
00C7
ü
00FC
é
00E9
â
00E2
ä
00E4
à
00E0
å
00E5
ç
00E7
ê
00EA
ë
00EB
è
00E8
ï
00EF
î
00EE
ì
00EC
Ä
00C4
Å
00C5
9x
144
É
00C9
æ
00E6
Æ
00C6
ô
00F4
ö
00F6
ò
00F2
û
00FB
ù
00F9
ÿ
00FF
Ö
00D6
Ü
00DC
¢
00A2
£
00A3
¥
00A5
₧
20A7
ƒ
0192
Ax
160
á
00E1
í
00ED
ó
00F3
ú
00FA
ñ
00F1
Ñ
00D1
ª
00AA
º
00BA
¿
00BF
⌐
2310
¬
00AC
½
00BD
¼
00BC
¡
00A1
«
00AB
»
00BB
Bx
176
░
2591
▒
2592
▓
2593
│[e]
2502
┤
2524
╡
2561
╢
2562
╖
2556
╕
2555
╣
2563
║
2551
╗
2557
╝
255D
╜
255C
╛
255B
┐
2510
Cx
192
└
2514
┴
2534
┬
252C
├
251C
─
2500
┼
253C
╞
255E
╟
255F
╚
255A
╔
2554
╩
2569
╦
2566
╠
2560
═
2550
╬
256C
╧
2567
Dx
208
╨
2568
╤
2564
╥
2565
╙
2559
╘
2558
╒
2552
╓
2553
╫
256B
╪
256A
┘
2518
┌
250C
█
2588
▄
2584
▌
258C
▐
2590
▀
2580
Ex
224
α
03B1
ß[f]
00DF
Γ
0393
π[g]
03C0
Σ[h]
03A3
σ
03C3
µ[i]
00B5
τ
03C4
Φ
03A6
Θ[j]
0398
Ω[k]
03A9
δ[l]
03B4
∞
221E
φ[m]
03C6
ε[n]
03B5
∩
2229
Fx
240
≡
2261
±
00B1
≥
2265
≤
2264
⌠[o]
2320
⌡
2321
÷
00F7
≈
2248
°
00B0
∙[p]
2219
·
00B7
√[q]
221A
ⁿ
207F
²
00B2
■
25A0
NBSP[r]
00A0
  Symbols and punctuation

When translating to Unicode some codes do not have a unique, single Unicode equivalent; the correct choice may depend upon context.

  1. ↑ 0 draws a blank space, but usage as the C string terminator means it is more accurately translated as NUL. In their code-page-437-based implementation of C0-region graphics, Star Micronics printers re-purpose this code as a slashed zero.[17]
  2. ↑ 14 (Ehex) Mapping as shown, to the beamed eighth notes [U+266B, ♫], follows data provided by the Unicode Consortium.[18] In IBM's GCGID (Graphic Character Global IDentifier) system of character IDs, this is SM910000, simply annotated as "Two Musical Notes";[14][15] however, the reference glyph shows two beamed sixteenth notes [U+266C, ♬].[14] In the specification for IBM Japanese Host code, SM910080 (i.e. SM910000 with the fullwidth attribute set) is explicitly mapped to U+266C, and accordingly shows two semiquavers.