The Full Wiki

Code page: Wikis


Note: Many of our articles have direct quotes from sources you can cite, within the Wikipedia article! This article doesn't yet, but we're working on it! See more info or our list of citable articles.


From Wikipedia, the free encyclopedia

Code page is another name for character encoding. It consists of a table of values that describes the character set for a particular language. The term code page originated from IBM's EBCDIC-based mainframe systems,[1] but many vendors use this term including Microsoft, SAP,[2] and Oracle Corporation.[3] Vendors often allocate their own code page number to a character encoding, even if it is better known by another name (for example UTF-8 character encoding has code page numbers 1208 at IBM, 65001 at Microsoft, 4110 at SAP).


Microsoft code pages

Microsoft refers to code pages as OEM code pages, and supplements them with its own "ANSI" code pages.

Most well-known code pages, excluding those for the CJK languages and Vietnamese, fit all their code-points into 8 bits and do not involve anything more than mapping each code-point to a single bitmap; 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 8 may be stored in the display adaptor for easy switching [1]. There were a selection of code pages 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 system entirely. The character encodings used by these graphical systems (particularly MS-Windows) are sometimes called code pages as well.


Relationship to ASCII

The basis of the IBM1 PC1 code pages is ASCII, a 7-bit code representing 128 characters and control codes. In the past, 8-bit extensions to the ASCII code often either set the top bit to zero, or used it as a parity bit in network data transmissions. When this bit was instead made available for representing character data, another 128 characters and control codes could be represented. IBM used this extended range to encode characters used by various languages. No formal standard existed for these ‘extended character sets’; IBM merely referred to the variants as code pages, as it had always done for variants of EBCDIC encodings.

Relationship to Unicode

An earlier version of Unicode further extended this relationship by using an additional 13 bits. Most code page characters in the 0-7f range are the same in Unicode. Unicode has made code pages obsolete by supporting more languages and characters much more consistently.[citation needed]

IBM PC (OEM) code pages

These code pages are most often used under MS-DOS-like operating systems. They include a lot of box-drawing characters. Since the original IBM PC code page (number 437) was not really designed for international use, several incompatible variants emerged. Microsoft refers to these as the OEM code pages. Examples include:

In modern applications, operating systems and programming languages, the IBM code pages have been rendered obsolete by newer and better international standards, such as Unicode.[citation needed] However, many display and printing devices still have code pages in ROM, especially code page 437, and so continued use of code pages is sometimes necessary.

Other Windows code pages

The following code page numbers are specific to Microsoft Windows. IBM uses different numbers for these code pages.

Windows (ANSI) code pages

Microsoft defined a number of code pages known as the ANSI code pages (as the first one, 1252 was based on an apocryphal ANSI draft of what became ISO 8859-1). Code page 1252 is built on ISO 8859-1 but uses the range 0x80-0x9F for extra printable characters rather than the C1 control codes used in ISO-8859-1. Some of the others are based in part on other parts of ISO 8859 but often rearranged to make them closer to 1252.

Microsoft recommends applications use UTF-8 or Unicode instead of these code pages.


Many code pages, except Unicode, suffer from several problems.

  1. Some code page vendors insufficiently document the meaning of all code point values. This decreases the reliability of handling textual data through various computer systems consistently.
  2. Some vendors add proprietary extensions to some code pages to add or change certain code point values. For example, byte \x5C in Shift JIS can represent either a back slash or a yen currency symbol depending on the platform.
  3. Multiple languages can not be handled in the same program.

Due to Unicode's extensive documentation, vast repertoire of characters and stability policy of characters, these problems are rarely a concern for Unicode.

Applications may also mislabel text in Windows-1252 as ISO-8859-1. Fortunately, the only difference between these code pages is that the code point values used by ISO-8859-1 for control characters are instead used as additional printable characters in Windows-1252. Since control characters have no function in HTML, web browsers tend to use Windows-1252 rather than ISO-8859-1.

Private code pages

When, early in the history of personal computers, users didn't find their character encoding requirements met, private or local code pages were created using Terminate and Stay Resident utilities or by re-programming BIOS EPROMs. In some cases, unofficial code page numbers were invented (e.g., cp895).

When more diverse character set support became available most of those code pages fell into disuse, with some exceptions such as the Kamenický or KEYBCS2 encoding for the Czech and Slovak alphabets. Another character set is Iran System encoding standard that was created by Iran System corporation for Persian language support. This standard was in use in Iran in DOS-based programs and after introduction of Microsoft code page 1256 this standard became obsolete. However some Windows and DOS programs using this encoding are still in use and some Windows fonts with this encoding exist.

See also


  1. ^ IBM i Globalization - EBCDIC Code Pages
  2. ^ SAP ABAP glossary
  3. ^ Oracle Hyperion glossary

External links


Got something to say? Make a comment.
Your name
Your email address