In computing, a code page is a character encoding and as such it is a specific association of a set of (identifiers for) printable and non-printable characters with unique numbers ("code points"). Typically each number represents the binary value in a single byte. (In some contexts these terms are used more precisely; see .)
The term "code page" originated from IBM's EBCDIC-based mainframe systems, but Microsoft, SAP, and Oracle Corporation are among the vendors that use this term. The majority of vendors identify their own character sets by a name. In the case when there is a plethora of character sets (like in IBM), identifying character sets through a number is a convenient way to distinguish them. Originally, the code page numbers referred to the page numbers in the IBM standard character set manual, a condition which has not held for a long time. Vendors that use a code page system allocate their own code page number to a character encoding, even if it is better known by another name; for example, UTF-8 has been assigned page numbers 1208 at IBM, 65001 at Microsoft, and 4110 at SAP.
Hewlett-Packard uses a similar concept in its HP-UX operating system and its Printer Command Language (PCL) protocol for printers (either for HP printers or not). The terminology, however, is different: What others call a character set, HP calls a symbol set, and what IBM or Microsoft call a code page, HP calls a symbol set code. HP developed a series of symbol sets, each with an associated symbol set code, to encode both its own character sets and other vendors’ character sets.
The multitude of character sets leads many vendors to recommend Unicode.
The code page numbering system IBM introduced the concept of systematically assigning a small, but globally unique, 16 bit number to each character encoding that a computer system or collection of computer systems might encounter. The IBM origin of the numbering scheme is reflected in the fact that the smallest (first) numbers are assigned to variations of IBM's EBCDIC encoding and slightly larger numbers refer to variations of IBM's extended ASCII encoding as used in its PC hardware.
With the release of PC DOS version 3.3 (and the near identical MS-DOS 3.3) IBM introduced the code page numbering system to regular PC users, as the code page numbers (and the phrase "code page") were used in new commands to allow the character encoding used by all parts of the OS to be set in a systematic way.
After IBM and Microsoft ceased to cooperate in the 1990s, the two companies have maintained the list of assigned code page numbers independently from each other, resulting in some conflicting assignments. At least one third-party vendor (Oracle) also has its own different list of numeric assignments. IBM's current assignments are listed in their CCSID repository, while Microsoft's assignments are documented within the MSDN. Additionally, a list of the names and approximate IANA (Internet Assigned Numbers Authority) abbreviations for the installed code pages on any given Windows machine can be found in the Registry on that machine (this information is used by Microsoft programs such as Internet Explorer).
Most well-known code pages, excluding those for the CJK languages and Vietnamese, fit all their code-points into eight bits and do not involve anything more than mapping each code-point to a single character; furthermore, techniques such as combining characters, complex scripts, etc., are not involved.
The text mode of standard (VGA-compatible) PC graphics hardware is built around using an 8-bit code page, though it is possible to use two at once with some color depth sacrifice, and up to eight may be stored in the display adapter for easy switching. There was a selection of third-party code page fonts that could be loaded into such hardware. However, it is now commonplace for operating system vendors to provide their own character encoding and rendering systems that run in a graphics mode and bypass this hardware limitation entirely. However the system of referring to character encodings by a code page number remains applicable, as an efficient alternative to string identifiers such as those specified by the IETF and IANA for use in various protocols such as e-mail and web pages.
Relationship to ASCII The majority of code pages in current use are supersets of ASCII, a 7-bit code representing 128 control codes and printable characters. In the distant past, 8-bit implementations of the ASCII code set the top bit to zero or used it as a parity bit in network data transmissions. When the top bit was made available for representing character data, a total of 256 characters and control codes could be represented. Most vendors (including IBM) used this extended range to encode characters used by various languages and graphical elements that allowed the imitation of primitive graphics on text-only output devices. No formal standard existed for these "extended ASCII character sets" and vendors referred to the variants as code pages, as IBM had always done for variants of EBCDIC encodings.
Relationship to Unicode Unicode is an effort to include all characters from all currently and historically used human languages into single character enumeration (effectively one large single code page), removing the need to distinguish between different code pages when handling digitally stored text. Unicode tries to retain backwards compatibility with many legacy code pages, copying some code pages 1:1 in the design process. An explicit design goal of Unicode was to allow round-trip conversion between all common legacy code pages, although this goal has not always been achieved. Some vendors, namely IBM and Microsoft, have anachronistically assigned code page numbers to Unicode encodings. This convention allows code page numbers to be used as metadata to identify the correct decoding algorithm when encountering binary stored data.
IBM code pages EBCDIC-based code pages These code pages are used by IBM in its EBCDIC character sets for mainframe computers.
1 – USA WP, Original 2 – USA 3 – USA Accounting, Version A 4 – USA 5 – USA 6 – Latin America 7 – Germany F.R. / Austria 8 – Germany F.R. 9 – France, Belgium 10 – Canada (English) 11 – Canada (French) 12 – Italy 13 – Netherlands 14 – Spain 15 – Switzerland (French) 16 – Switzerland (French / German) 17 – Switzerland (German) 18 – Sweden / Finland 19 – Sweden / Finland WP, version 2 20 – Denmark/Norway 21 – Brazil 22 – Portugal 23 – United Kingdom 24 – United Kingdom 25 – Japan (Latin) 26 – Japan (Latin) 27 – Greece (Latin) 29 – Iceland 30 – Turkey 31 – South Africa 32 – Czechoslovakia (Czech / Slovak) 33 – Czechoslovakia 34 – Czechoslovakia 35 – Romania 36 – Romania 37 – USA/Canada - CECP (same with euro: 1140) 37-2 – The real 3279 APL codepage, as used by C/370. This is very close to 1047, except for caret and not-sign inverted. It is not officially recognized by IBM, even though SHARE has pointed out its existence. 38 – USA ASCII 39 – United Kingdom / Israel 40 – United Kingdom 251 – China 252 – Poland 254 – Hungary 256 – International #1 (superseded by 500) 257 – International #2 258 – International #3 259 – Symbols, Set 7 260 – Canadian French - 116 264 – Print Train & Text processing extended 273 – Germany F.R./Austria - CECP (same with euro: 1141) 274 – Old Belgium Code Page 275 – Brazil - CECP 276 – Canada (French) - 94 277 – Denmark, Norway - CECP (same with euro: 1142) 278 – Finland, Sweden - CECP (same with euro: 1143) 279 – French - 94 280 – Italy - CECP (same with euro: 1144) 281 – Japan (Latin) - CECP 282 – Portugal - CECP 283 – Spain - 190 284 – Spain/Latin America - CECP (same with euro: 1145) 285 – United Kingdom - CECP (same with euro: 1146) 286 – Austria / Germany F.R. Alternate 287 – Denmark / Norway Alternate 288 – Finland / Sweden Alternate 289 – Spain Alternate 290 – Japanese (Katakana) Extended 293 – APL 297 – France (same with euro: 1147) 298 – Japan (Katakana) 300 – Japan (Kanji) DBCS (For JIS X 0213) 310 – Graphic Escape APL/TN 320 – Hungary 321 – Yugoslavia 322 – Turkey 330 – International #4 340 – EBCDIC, OCR (same as 893, superseded by 892 and 893) 351 – GDDM default 352 – Printing and publishing option 353 – BCDIC-A 354 – BCDIC-B 355 – PTTC/BCD standard option 357 – PTTC/BCD H option 358 – PTTC/BCD Correspondence option 359 – PTTC/BCD Monocase option 360 – PTTC/BCD Duocase option 361 – EBCDIC Publishing International 363 – Symbols, set 8 382 – EBCDIC Publishing Austria, Germany F.R. Alternate 383 – EBCDIC Publishing Belgium 384 – EBCDIC Publishing Brazil 385 – EBCDIC Publishing Canada (French) 386 – EBCDIC Publishing Denmark, Norway 387 – EBCDIC Publishing Finland, Sweden 388 – EBCDIC Publishing France 389 – EBCDIC Publishing Italy 390 – EBCDIC Publishing Japan (Latin) 391 – EBCDIC Publishing Portugal 392 – EBCDIC Publishing Spain, Philippines 393 – EBCDIC Publishing Latin America (Spanish Speaking) 394 – EBCDIC Publishing China (Hong Kong), UK, Ireland 395 – EBCDIC Publishing Australia, New Zealand, USA, Canada (English) 396 – BookMaster Specials 410 – Cyrillic (revisions: 880, 1025, 1154) 420 – Arabic 421 – Maghreb/French 423 – Greek (superseded by 875) 424 – Hebrew (Bulletin Code) 425 – Arabic / Latin for OS/390 Open Edition 435 – Teletext Isomorphic 500 – International #5 (ECECP; supersedes 256) (same with euro: 1148) 803 – Hebrew Character Set A (Old Code) 829 – Host Math Symbols- Publishing 830 – Math Format 831 – Portugal (Alternate) (same as 37) 833 – Korean Extended (SBCS) 834 – Korean Hangul (KSC5601; DBCS with UDCs) 835 – Traditional Chinese DBCS 836 – Simplified Chinese Extended 837 – Simplified Chinese DBCS 838 – Thai with Low Marks & Accented Characters (same with euro: 1160) 839 – Thai DBCS 870 – Latin 2 (same with euro: 1153) (revision: 1110) 871 – Iceland (same with euro: 1149) 875 – Greek (supersedes 423) 880 – Cyrillic (revision of 410) (revisions: 1025, 1154) 881 – United States - 5080 Graphics System 882 – United Kingdom - 5080 Graphics System 883 – Sweden - 5080 Graphics System 884 – Germany - 5080 Graphics System 885 – France - 5080 Graphics System 886 – Italy - 5080 Graphics System 887 – Japan - 5080 Graphics System 888 – France AZERTY - 5080 Graphics System 889 – Thailand 890 – Yugoslavia 892 – EBCDIC, OCR A 893 – EBCDIC, OCR B 905 – Latin 3 918 – Urdu Bilingual 924 – Latin 9 930 – Japan MIX (290 + 300) (same with euro: 1390) 931 – Japan MIX (37 + 300) 933 – Korea MIX (833 + 834) (same with euro: 1364) 935 – Simplified Chinese MIX (836 + 837) (same with euro: 1388) 937 – Traditional Chinese MIX (37 + 835) (same with euro: 1371) 939 – Japan MIX (1027 + 300) (same with euro: 1399) 1001 – MICR 1002 – EBCDIC DCF Release 2 Compatibility 1003 – EBCDIC DCF, US Text subset 1005 – EBCDIC Isomorphic Text Communication 1007 – EBCDIC Arabic (XCOM2) 1024 – EBCDIC T.61 1025 – Cyrillic, Multilingual (same with euro: 1154) (Revision of 880) 1026 – EBCDIC Turkey (Latin 5) (same with euro: 1155) (supersedes 905 in that country) 1027 – Japanese (Latin) Extended (JIS X 0201 Extended) 1028 – EBCDIC Publishing Hebrew 1030 – Japanese (Katakana) Extended 1031 – Japanese (Latin) Extended 1032 – MICR, E13-B Combined 1033 – MICR, CMC-7 Combined 1037 – Korea - 5080/6090 Graphics System 1039 – GML Compatibility 1047 – Latin 1/Open Systems 1068 – DCF Compatibility 1069 – Latin 4 1070 – USA / Canada Version 0 (Code page 37 Version 0) 1071 – Germany F.R. / Austria (Code page 273 Version 0) 1072 – Belgium (Code page 274 Version 0) 1073 – Brazil (Code page 275 Version 0) 1074 – Denmark, Norway (Code page 277 Version 0) 1075 – Finland, Sweden (Code page 278 Version 0) 1076 – Italy (Code page 280 Version 0) 1077 – Japan (Latin) (Code page 281 Version 0) 1078 – Portugal (Code page 282 Version 0)