Code pages on the Windows OS

Code pages on the Windows OS

=History=

A code page is a mapping between values stored in memory and the symbols they represent. On MS-DOS systems (prior to Windows) the code page was what today is called the OEM code page. At the time, the common code page (Code page 437) contained many box-drawing characters which were used to simulate a GUI in MS-DOS. It did not contain sufficient accented letters to support many European languages. [http://blogs.msdn.com/oldnewthing/archive/2005/03/08/389527.aspx Keep your eye on the code page] ]

With the advent of Windows, it was decided that a new code page with those box-drawing characters replaced by accented letters was required (Windows-1252). However, since most existing applications were MS-DOS and might depend on cp437, the existing code page could not be replaced. Hence, the concept of ANSI code pages and OEM code pages was created. ANSI code pages are used by Windows and its applications. Despite its name, ANSI code pages are not endorsed by the American National Standards Institute. OEM code pages are used by MS-DOS. [http://support.microsoft.com/kb/q65124 Writing International Applications for Windows] ]

Use

The default OEM code page can be changed by changing the system wide locale and rebooting. This also changes the raster font available to the console. [http://www.microsoft.com/globaldev/getwr/steps/WRG_lclmdl.mspx Globalization Step-by-Step] ] The active OEM code page can be changed by the MS-DOS chcp command, but this will not display correctly unless you switch from the default raster font to Lucida Console. Raster fonts do not support non-system-wide changing of the code page. [ [http://support.microsoft.com/kb/q191309 Change Code Page Command] ] [http://www.computerhope.com/chcphlp.htm Microsoft DOS chcp command] ] [http://www.kpym.com/blog/2005/11/console-howto-change-console-font.html How to change console font programmatically] ] [http://www.aggressivesoftware.com/misc/latin1/ Latin1] ]

Windows alt codes can be used to input characters from the OEM or ANSI code pages. This is useful for the characters that not available on your keyboard. However, when using MS-DOS, if a character requested from the ANSI code page does not exist in the OEM code page, then a best-fit translation automatically occurs. When using a raster font, the result of the best-fit translation is displayed. When using Lucida Console, the character prior to the best-fit translation is displayed, but the translated byte is actually received by the application. Hence, using the ANSI alt codes in MS-DOS is error prone when the OEM code page does not support all characters in the ANSI code page.

Prior to Windows Vista, the active console code page can be changed programatically, but the console font cannot. So if the console is in the default configuration (using raster fonts), then programatic changing of the code page is not useful for console applications because incorrect characters will be displayed to the user.

See also

* Code page 437
* Code page 850
* Windows-1252
* Alt code

External links

* [http://www.aggressivesoftware.com/misc/latin1/ Latin1]
* [http://support.microsoft.com/kb/q65124 Writing International Applications for Windows]
* [http://www.microsoft.com/globaldev/reference/wincp.mspx Windows Code Pages]
* [http://www.microsoft.com/globaldev/reference/oem.mspx OEM Code Pages]
* [http://www.microsoft.com/globaldev/reference/iso.mspx ISO Code Pages]
* [http://www.computerhope.com/chcphlp.htm Microsoft DOS chcp command]
* [http://support.microsoft.com/kb/108450 MultiByteToWideChar() Codepages CP_ACP/CP_OEMCP]
* [http://blogs.msdn.com/oldnewthing/archive/2005/03/08/389527.aspx Keep your eye on the code page]
* [http://blogs.msdn.com/michkap/archive/2005/03/01/382289.aspx Code pages are really not enough]
* [http://blogs.msdn.com/michkap/archive/2005/02/08/369197.aspx Why ACP != OEMCP (usually)]
* [http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q247815 Necessary criteria for fonts to be available in a command window]
* [http://www.kpym.com/blog/2005/11/console-howto-change-console-font.html How to change console font programmatically]
* [http://www.microsoft.com/globaldev/getwr/steps/WRG_lclmdl.mspx Globalization Step-by-Step]
* [http://support.microsoft.com/kb/q191309 Change Code Page Command]

References


Wikimedia Foundation. 2010.

Игры ⚽ Нужно решить контрольную?

Look at other dictionaries:

  • Code pages on Microsoft Windows — Contents 1 History 2 Use 3 See also 4 External links 5 References …   Wikipedia

  • Windows code page — Windows code pages are sets of characters or code pages (known as character encodings in other operating systems) used in Microsoft Windows from the 1980s and 1990s. Windows code pages were gradually superseded when Unicode was implemented in… …   Wikipedia

  • Code page — is another term 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… …   Wikipedia

  • Code page 720 — (also known as CP 720, IBM 00720,[1] OEM 720) is a code page used under MS DOS to write Arabic. The Windows (ANSI) code page for Arabic is Windows 1256.[2] Codepage layout The following table shows code page 720.[3] Each character is shown with… …   Wikipedia

  • Code page 866 — (CP 866) is a code page used under MS DOS to write Cyrillic script.[1] It is based on the alternative character set of GOST 19768 87. The code was widely used during MS DOS era because it preserves the pseudographic symbols (unlike Windows 1251)… …   Wikipedia

  • Code page 852 — (also known as CP 852, IBM 00852,[1] OEM 852 (Latin II),[2][3] MS DOS Latin 2[4]) is a code page used under MS DOS to write Central European languages that use Latin script (such as Bosnian, Croatian, Czech, Hungarian …   Wikipedia

  • Windows-1252 — Windows 1252, sometimes called incorrectly ANSI . Blue dots indicate unused or control characters Windows 1252 or CP 1252 is a character encoding of the Latin alphabet, used by default in the legacy components of Microsoft Windows in English and… …   Wikipedia

  • Code page 437 — Code page 437, as rendered by the IBM PC using a VGA adapter. 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… …   Wikipedia

  • Windows-1257 — (Windows Baltic) is a single byte code page used to support the Estonian, Latvian and Lithuanian languages under Microsoft Windows. This code page is similar in layout to ISO 8859 13, but they differ in codepoints A1, A5, B4, FF, and of course in …   Wikipedia

  • Windows 2000 — Part of the Microsoft Windows family Screenshot of Windows 2000 Professional …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”