Windows code pages are sets of characters or
code pages (known as
character encoding
Character encoding is the process of assigning numbers to graphical character (computing), characters, especially the written characters of human language, allowing them to be stored, transmitted, and transformed using computers. The numerical v ...
s in other operating systems) used in
Microsoft Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
from the 1980s and 1990s. Windows code pages were gradually superseded when
Unicode was implemented in Windows, although they are still supported both within Windows and other platforms, and still apply when
Alt code shortcuts are used.
Current Windows versions support
Unicode
Unicode or ''The Unicode Standard'' or TUS is a character encoding standard maintained by the Unicode Consortium designed to support the use of text in all of the world's writing systems that can be digitized. Version 16.0 defines 154,998 Char ...
, new Windows applications should use Unicode (UTF-8) and not 8-bit character encodings.
There are two groups of system code pages in Windows systems: OEM and Windows-native ("ANSI") code pages.
(ANSI is the
American National Standards Institute
The American National Standards Institute (ANSI ) is a private nonprofit organization that oversees the development of voluntary consensus standards for products, services, processes, systems, and personnel in the United States. The organiz ...
.) Code pages in both of these groups are
extended ASCII
Extended ASCII is a repertoire of character encodings that include (most of) the original 96 ASCII character set, plus up to 128 additional characters. There is no formal definition of "extended ASCII", and even use of the term is sometimes critic ...
code pages. Additional code pages are supported by standard Windows conversion routines, but not used as either type of system code page.
ANSI code page
ANSI code pages (officially called "Windows code pages" after Microsoft accepted the former term being a misnomer
) are used for native non-Unicode (say,
byte oriented) applications using a
graphical user interface
A graphical user interface, or GUI, is a form of user interface that allows user (computing), users to human–computer interaction, interact with electronic devices through Graphics, graphical icon (computing), icons and visual indicators such ...
on Windows systems. The term "ANSI" is a misnomer because these Windows code pages do not comply with any
ANSI (American National Standards Institute) standard;
code page 1252 was based on an early ANSI draft that became the international standard
ISO 8859-1
ISO/IEC 8859-1:1998, ''Information technology— 8-bit single-byte coded graphic character sets—Part 1: Latin alphabet No. 1'', is part of the ISO/IEC 8859 series of ASCII-based standard character encodings, first edition published in 19 ...
,
which adds a further 32 control codes and space for 96 printable characters. Among other differences, Windows code-pages allocate printable characters to the supplementary control code space, making them at best illegible to standards-compliant operating systems.)
Most
legacy
Legacy or Legacies may refer to:
Arts and entertainment
Comics
* " Batman: Legacy", a 1996 Batman storyline
* '' DC Universe: Legacies'', a comic book series from DC Comics
* ''Legacy'', a 1999 quarterly series from Antarctic Press
* ''Legacy ...
"ANSI" code pages have code page numbers in the pattern 125x. However,
874 (Thai) and the East Asian multi-byte "ANSI" code pages (
932
Year 932 (Roman numerals, CMXXXII) was a leap year starting on Sunday of the Julian calendar.
Events
By place
Europe
* Summer – Alberic II of Spoleto, Alberic II leads an uprising at Rome against his stepfather Hugh of Italy, Hu ...
,
936,
949,
950), all of which are also used as OEM code pages, are numbered to match IBM encodings, none of which are identical to the Windows encodings (although most are similar). While
code page 1258 is also used as an OEM code page, it is original to Microsoft rather than an extension to an existing encoding. IBM have assigned their own, different numbers for Microsoft's variants, these are given for reference in the lists below where applicable.
All of the 125x Windows code pages, as well as 874 and 936, are labelled by
Internet Assigned Numbers Authority
The Internet Assigned Numbers Authority (IANA) is a standards organization that oversees global IP address allocation, Autonomous system (Internet), autonomous system number allocation, DNS root zone, root zone management in the Domain Name Syste ...
(IANA) as "Windows-''number''", although "Windows-936" is treated as a synonym for "
GBK". Windows code page 932 is instead labelled as "Windows-31J".
ANSI Windows code pages, and especially the code page
1252, were so called since they were purportedly based on drafts submitted or intended for ANSI. However, ANSI and
ISO
The International Organization for Standardization (ISO ; ; ) is an independent, non-governmental, international standard development organization composed of representatives from the national standards organizations of member countries.
Me ...
have not standardized any of these code pages. Instead they are either:
* Supersets of the standard sets such as those of
ISO 8859
ISO/IEC 8859 is a joint International Organization for Standardization, ISO and International Electrotechnical Commission, IEC series of standards for 8-bit character encodings. The series of standards consists of numbered parts, such as ISO/IEC ...
and the various national standards (like
Windows-1252
Windows-1252 or CP-1252 ( Windows code page 1252) is a legacy single-byte character encoding that is used by default (as the "ANSI code page") in Microsoft Windows throughout the Americas, Western Europe, Oceania, and much of Africa.
Initially ...
vs.
ISO-8859-1
ISO/IEC 8859-1:1998, ''Information technology—8-bit computing, 8-bit single-byte coded graphic character (computing), character sets—Part 1: Latin alphabet No. 1'', is part of the ISO/IEC 8859 series of ASCII-based standard character enc ...
),
* Major modifications of these (making them incompatible to various degrees, like
Windows-1250 vs.
ISO-8859-2)
* Having no parallel encoding (like
Windows-1257 vs.
ISO-8859-4;
ISO-8859-13 was introduced much later). Also,
Windows-1251
Windows-1251 is an 8-bit character encoding, designed to cover languages that use the Cyrillic script such as Russian, Ukrainian, Belarusian, Bulgarian, Serbian Cyrillic, Macedonian and other languages.
On the web, it is the second most-used ...
follows neither the ISO-standardised
ISO-8859-5 nor the then-prevailing
KOI-8.
Microsoft assigned about twelve of the
typography
Typography is the art and technique of Typesetting, arranging type to make written language legibility, legible, readability, readable and beauty, appealing when displayed. The arrangement of type involves selecting typefaces, Point (typogra ...
and business characters (including notably, the
euro sign
The euro sign () is the currency sign used for the euro, the official currency of the eurozone. The design was presented to the public by the European Commission on 12 December 1996. It consists of a stylized letter E (or epsilon), crossed by ...
, €) in CP1252 to the
code point
A code point, codepoint or code position is a particular position in a Table (database), table, where the position has been assigned a meaning. The table may be one dimensional (a column), two dimensional (like cells in a spreadsheet), three dime ...
s 0x80–0x9F that, in ISO 8859, are assigned to
C1 control codes. These assignments are also present in many other ANSI/Windows code pages at the same code-points. Windows did not use the C1 control codes, so this decision had no direct effect on Windows users. However, if included in a file transferred to a standards-compliant platform like Unix or MacOS, the information was invisible and potentially disruptive.
OEM code page
The OEM code pages (
original equipment manufacturer) are used by
Win32 console applications, and by
virtual DOS, and can be considered a holdover from
DOS and the original
IBM PC
The IBM Personal Computer (model 5150, commonly known as the IBM PC) is the first microcomputer released in the List of IBM Personal Computer models, IBM PC model line and the basis for the IBM PC compatible ''de facto'' standard. Released on ...
architecture. A separate suite of code pages was implemented not only due to compatibility, but also because the
fonts of VGA (and descendant) hardware suggest encoding of
line-drawing characters to be compatible with
code page 437
Code page 437 ( CCSID 437) is the character set of the original IBM PC (personal computer). It is also known as CP437, OEM-US, OEM 437, PC-8, or MS-DOS Latin US. The set includes all printable ASCII characters as well as some accented letters (di ...
. Most OEM code pages share many code points, particularly for non-letter characters, with the second (non-ASCII) half of CP437.
A typical OEM code page, in its second half, does not resemble any ANSI/Windows code page even roughly. Nevertheless, two single-byte, fixed-width code pages (874 for
Thai and 1258 for
Vietnamese) and four multibyte
CJK code pages (
932
Year 932 (Roman numerals, CMXXXII) was a leap year starting on Sunday of the Julian calendar.
Events
By place
Europe
* Summer – Alberic II of Spoleto, Alberic II leads an uprising at Rome against his stepfather Hugh of Italy, Hu ...
,
936,
949,
950) are used as both OEM and ANSI code pages. Code page 1258 uses
combining diacritic
In digital typography, combining characters are characters that are intended to modify other characters. The most common combining characters in the Latin script are the combining diacritical marks (including combining accents).
Unicode al ...
s, as Vietnamese requires more than 128 letter-diacritic combinations. This is in contrast to
VISCII, which replaces some of the
C0 (i.e. ASCII) control codes.
History
Early computer systems had limited storage and restricted the number of
bits available to encode a
character. Although earlier proprietary encodings had fewer, the
American Standard Code for Information Interchange (ASCII) settled on seven bits: this was sufficient to encode a 96 member subset of the characters used in the US. As eight-bit
byte
The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable un ...
s came to predominate, Microsoft (and others) expanded the repertoire to 224, to handle a variety of other uses such a box-drawing symbols. The need to provide
precomposed character
A precomposed character (alternatively composite character or decomposable character) is a Unicode entity that can also be defined as a sequence of one or more other characters. A precomposed character may typically represent a letter with a diac ...
s for the Western European and South American markets required a different character set: Microsoft established the principle of code pages, one for each alphabet. For the
segmental scripts used in most of Africa, the Americas, southern and south-east Asia, the Middle East and Europe, a character needs just one byte but two or more bytes are needed for the
ideographic sets used in the rest of the world. The code-page model was unable to handle this challenge.
Since the late 1990s, software and systems have adopted
Unicode
Unicode or ''The Unicode Standard'' or TUS is a character encoding standard maintained by the Unicode Consortium designed to support the use of text in all of the world's writing systems that can be digitized. Version 16.0 defines 154,998 Char ...
as their preferred character encoding format: Unicode is designed to handle millions of characters. All current Microsoft products and
application program interfaces use Unicode internally, but some applications continue to use the default encoding of the computer's 'locale' when reading and writing text data to files or standard output. Therefore, files may still be encountered that are legible and intelligible in one part of the world but unintelligible
mojibake
Mojibake (; , 'character transformation') is the garbled or gibberish text that is the result of text being decoded using an unintended character encoding. The result is a systematic replacement of symbols with completely unrelated ones, often ...
in another.
UTF-8, UTF-16
Microsoft adopted a Unicode encoding (first the now-obsolete
UCS-2, which was then Unicode's only encoding), i.e.
UTF-16 for all its
operating system
An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ...
s from Windows NT onwards, but additionally supports
UTF-8
UTF-8 is a character encoding standard used for electronic communication. Defined by the Unicode Standard, the name is derived from ''Unicode Transformation Format 8-bit''. Almost every webpage is transmitted as UTF-8.
UTF-8 supports all 1,112,0 ...
(aka
CP_UTF8
) since
Windows 10 version 1803.
UTF-16 uniquely encodes all Unicode characters in the
Basic Multilingual Plane (BMP) using 16 bits but the remaining Unicode (e.g.
emoji
An emoji ( ; plural emoji or emojis; , ) is a pictogram, logogram, ideogram, or smiley embedded in text and used in electronic messages and web pages. The primary function of modern emoji is to fill in emotional cues otherwise missing from type ...
s) is encoded with a 32-bit (four byte) code while the rest of the industry (
Unix-like
A Unix-like (sometimes referred to as UN*X, *nix or *NIX) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Uni ...
systems and the web), and now Microsoft chose
UTF-8
UTF-8 is a character encoding standard used for electronic communication. Defined by the Unicode Standard, the name is derived from ''Unicode Transformation Format 8-bit''. Almost every webpage is transmitted as UTF-8.
UTF-8 supports all 1,112,0 ...
(which uses one byte for the 7-bit
ASCII
ASCII ( ), an acronym for American Standard Code for Information Interchange, is a character encoding standard for representing a particular set of 95 (English language focused) printable character, printable and 33 control character, control c ...
character set, two or three bytes for other characters in the BMP, and four bytes for the remainder).
List
The following Windows code pages exist:
Windows-125x series
These nine code pages are all
extended ASCII
Extended ASCII is a repertoire of character encodings that include (most of) the original 96 ASCII character set, plus up to 128 additional characters. There is no formal definition of "extended ASCII", and even use of the term is sometimes critic ...
8-bit
SBCS encodings, and were designed by
Microsoft
Microsoft Corporation is an American multinational corporation and technology company, technology conglomerate headquartered in Redmond, Washington. Founded in 1975, the company became influential in the History of personal computers#The ear ...
for use as ANSI codepages on Windows. They are commonly known by their IANA-registered
names as
windows-<number>
, but are also sometimes called
cp<number>
, "cp" for "code page". They are all used as ANSI code pages; Windows-1258 is also used as an OEM code page.
The Windows-125x series includes nine of the ANSI code pages, and mostly covers scripts from
Europe
Europe is a continent located entirely in the Northern Hemisphere and mostly in the Eastern Hemisphere. It is bordered by the Arctic Ocean to the north, the Atlantic Ocean to the west, the Mediterranean Sea to the south, and Asia to the east ...
and
West Asia
West Asia (also called Western Asia or Southwest Asia) is the westernmost region of Asia. As defined by most academics, UN bodies and other institutions, the subregion consists of Anatolia, the Arabian Peninsula, Iran, Mesopotamia, the Armenian ...
with the addition of
Vietnam
Vietnam, officially the Socialist Republic of Vietnam (SRV), is a country at the eastern edge of mainland Southeast Asia, with an area of about and a population of over 100 million, making it the world's List of countries and depende ...
. System encodings for
Thai and for
East Asia
East Asia is a geocultural region of Asia. It includes China, Japan, Mongolia, North Korea, South Korea, and Taiwan, plus two special administrative regions of China, Hong Kong and Macau. The economies of Economy of China, China, Economy of Ja ...
n languages were numbered to match similar IBM code pages and are used as both ANSI and OEM code pages; these are covered in following sections.
DOS code pages
These are also ASCII-based. Most of these are included for use as OEM code pages; code page 874 is also used as an ANSI code page.
*
437 – IBM PC US, 8-bit
SBCS extended ASCII
Extended ASCII is a repertoire of character encodings that include (most of) the original 96 ASCII character set, plus up to 128 additional characters. There is no formal definition of "extended ASCII", and even use of the term is sometimes critic ...
.
Known as OEM-US, the encoding of the primary built-in font of VGA graphics cards.
*
708 – Arabic, extended
ISO 8859-6 (ASMO 708)
* 720 – Arabic, retaining box drawing characters in their usual locations
*
737 – "MS-DOS Greek". Retains all box drawing characters. More popular than 869.
* 775 – "MS-DOS Baltic Rim"
*
850 – "MS-DOS Latin 1". Full (re-arranged) repertoire of
ISO 8859-1
ISO/IEC 8859-1:1998, ''Information technology— 8-bit single-byte coded graphic character sets—Part 1: Latin alphabet No. 1'', is part of the ISO/IEC 8859 series of ASCII-based standard character encodings, first edition published in 19 ...
.
*
852
__NOTOC__
Year 852 (Roman numerals, DCCCLII) was a leap year starting on Friday of the Julian calendar.
Events
By place
Europe
* March 4 – Trpimir I of Croatia, Trpimir I, duke (''Knyaz, knez'') of Duchy of Croatia, Croatia, an ...
– "MS-DOS Latin 2"
* 855 – "MS-DOS Cyrillic". Mainly used for
South Slavic languages
The South Slavic languages are one of three branches of the Slavic languages. There are approximately 30 million speakers, mainly in the Balkans. These are separated geographically from speakers of the other two Slavic branches (West Slavic la ...
. Includes (re-arranged) repertoire of
ISO-8859-5. Not to be confused with cp866.
* 857 – "MS-DOS Turkish"
*
858 – Western European with euro sign
* 860 – "MS-DOS Portuguese"
*
861 – "MS-DOS Icelandic"
*
862 – "MS-DOS Hebrew"
*
863 – "MS-DOS French Canada"
*
864 – Arabic
*
865 – "MS-DOS Nordic"
*
866 – "MS-DOS Cyrillic Russian", cp866. Sole purely OEM code page (rather than ANSI or both) included as a legacy encoding in WHATWG Encoding Standard for
HTML5
HTML5 (Hypertext Markup Language 5) is a markup language used for structuring and presenting hypertext documents on the World Wide Web. It was the fifth and final major HTML version that is now a retired World Wide Web Consortium (W3C) recommend ...
.
*
869 – "MS-DOS Greek 2", IBM869. Full (re-arranged) repertoire of
ISO 8859-7.
*
874 –
Thai, also used as the ANSI code page, extends
ISO 8859-11 (and therefore
TIS-620) with a few additional characters from Windows-1252. Corresponds to IBM code page 1162 (IBM-874 is similar but has different extensions).
East Asian multi-byte code pages
These often differ from the IBM code pages of the same number: code pages 932, 949 and 950 only partly match the IBM code pages of the same number, while the number 936 was used by IBM for another Simplified Chinese encoding which is now deprecated and Windows-951, as part of a
kludge, is unrelated to IBM-951. IBM equivalent code pages are given in the second column. Code pages 932, 936, 949 and 950/951 are used as both ANSI and OEM code pages on the locales in question.

A few further multiple-byte code pages are supported for decoding or encoding using operating system libraries, but not used as either sort of system encoding in any locale.
EBCDIC code pages
Unicode-related code pages
Macintosh compatibility code pages
ISO 8859 code pages
ITU-T code pages
KOI8 code pages
Problems arising from the use of code pages
Microsoft strongly recommends using Unicode in modern applications, but many applications or data files still depend on the legacy code pages.
* Programs need to know what code page to use in order to display the contents of (pre-Unicode) files correctly. If a program uses the wrong code page it may show text as
mojibake
Mojibake (; , 'character transformation') is the garbled or gibberish text that is the result of text being decoded using an unintended character encoding. The result is a systematic replacement of symbols with completely unrelated ones, often ...
.
* The code page in use may differ between machines, so (pre-Unicode) files created on one machine may be unreadable on another.
* Data is often improperly tagged with the code page, or not tagged at all, making determination of the correct code page to read the data difficult.
* These Microsoft code pages differ to various degrees from some of the standards and other vendors' implementations. This isn't a Microsoft issue ''per se'', as it happens to all vendors, but the lack of consistency makes interoperability with other systems unreliable in some cases.
* The use of code pages limits the set of characters that may be used.
* Characters expressed in an unsupported code page may be converted to question marks (?) or other
replacement characters, or to a simpler version (such as removing accents from a letter). In either case, the original character may be lost.
See also
* AppLocale – a utility to run non-Unicode (code page-based) applications in a locale of the user's choice.
References
External links
National Language Support (NLS) API Reference Table showing ANSI and OEM codepages per language (from web-archive since Microsoft removed the original page)
IANA Charset Name RegistrationsUnicode mapping table for Windows code pagesUnicode mappings of windows code pages with "best fit"
{{DEFAULTSORT:Windows Code Page