Open main menu

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 Windows, although they are still supported both within Windows and other platforms.

There are two groups of code pages in Windows systems: OEM and ANSI code pages. Code pages in both of these groups are extended ASCII code pages.

Contents

ANSI code pageEdit

Windows-125x series
Alias(es)ANSI (misnomer)
StandardWHATWG Encoding Standard
ExtendsUS-ASCII
Preceded byISO 8859
Succeeded byUnicode
UTF-16 (in Win32 API)

ANSI code pages (officially called "Windows code pages"[1] after Microsoft accepted the former term being a misnomer[2]) are used for native non-Unicode (say, byte oriented) applications using a graphical user interface on Windows systems. ANSI is a bit of a misnomer as the behavior does not exactly match the ANSI standards and other codepages can be selected, most recently UTF-8 Unicode.

Most 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, 936, 949, 950), all of which are also used as OEM code pages, are numbered to match similar (but not identical) IBM encodings. 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 (IANA) as "Windows-number", although "Windows-936" is treated as a synonym for "GBK". Windows code page 932 is instead labelled as "Windows-31J".[3]

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 have not standardized any of these code pages. Instead they are either:[2]

About twelve of the typography and business characters from CP1252 at code points 0x80–0x9F (in ISO 8859 occupied by C1 control codes, which are useless in Windows) are present in many other ANSI/Windows code pages at the same codes.

OEM code pageEdit

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 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. 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, 936, 949, 950) are used as both OEM and ANSI code pages. Code page 1258 uses combining diacritics, 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.

HistoryEdit

Initially, computer systems and system programming languages did not make a distinction between characters and bytes. This led to much confusion subsequently. Microsoft software and systems previous to the Windows NT line are examples of this, using the OEM and ANSI code pages, which do not make the distinction.

Since the late 1990s, software and systems are increasingly adopting more direct encodings of Unicode, in particular UTF-8 and UTF-16; this trend has been improved by the widespread adoption of XML, which provides a more adequate mechanism for labelling the encoding used.[4] Recent Microsoft products and application program interfaces use Unicode internally, but many applications and APIs continue to use the default encoding of the computer's locale when reading and writing text data to files or standard output. Therefore, though Unicode is the accepted standard, there is still backwards compatibility with the older Windows code pages.

The euro sign was introduced after many of the ANSI and OEM code pages were introduced; several code pages were revised to contain the euro sign.

Since version 1803, Windows machines can be configured to allow UTF-8 as the "ANSI" and OEM codepage.[5]

ListEdit

The following Windows code pages exist:

Windows-125x seriesEdit

These nine code pages are all extended ASCII 8-bit SBCS encodings, and were designed by Microsoft for use as ANSI codepages on Windows. They are commonly known by their IANA-registered[6] 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.

ID Description Relationship to ISO 8859 or other established encodings
1250[7][8] Latin 2 / Central European Similar to ISO-8859-2 but moves several characters, including multiple letters.
1251[9][10] Cyrillic Incompatible with both ISO-8859-5 and KOI-8.
1252[11][12] Latin 1 / Western European Superset of ISO-8859-1 (without C1 controls). Letter repertoire accordingly similar to CP850.
1253[13][14] Greek Similar to ISO 8859-7 but moves several characters, including a letter.
1254[15][16] Turkish Superset of ISO 8859-9 (without C1 controls).
1255[17][18] Hebrew Almost a superset of ISO 8859-8, but with two incompatible punctuation changes.
1256[19][20] Arabic Not compatible with ISO 8859-6; rather, OEM Code page 708 is a ISO 8859-6 (ASMO 708) superset.
1257[21][22] Baltic Not ISO 8859-4; the later ISO 8859-13 is closely related, but with some differences in available punctuation.
1258[23][24] Vietnamese (also OEM) Not related to VSCII or VISCII, uses fewer base characters with combining diacritics.

DOS code pagesEdit

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.[25] 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.
  • 852 - "MS-DOS Latin 2"
  • 855 - "MS-DOS Cyrillic". Mainly used for South Slavic languages. 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 - "Cyrillic (DOS)", cp866. Supports East Slavic languages (without Ґ). Sole purely OEM code page (rather than ANSI or both) included as a legacy encoding in WHATWG Encoding Standard for HTML5.
  • 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 pagesEdit

These often only partly match the IBM code pages of the same number: code pages 932, 936 and 949 differ from the IBM code pages of the same number, whereas 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.

ID IBM Equivalent Language Encoding Use
932 943 Japanese Shift_JIS (Microsoft variant) ANSI/OEM (Japan)
936 1386 Chinese (simplified) GBK ANSI/OEM (PRC, Singapore)
949 1363 Korean Unified Hangul Code ANSI/OEM (Republic of Korea)
950 950 (no €), 1370 Chinese (traditional) Big5 (Microsoft variant) ANSI/OEM (Taiwan, Hong Kong)
951 5471[26] Chinese (traditional) Big5-HKSCS (2001 ed.) ANSI/OEM (Hong Kong, 98/NT4/2000/XP with HKSCS patch)

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.

ID IBM Equivalent Language Encoding Use
1361 - Korean Johab (KS C 5601-1992 annex 3) Conversion
20000 964 Chinese (traditional) CNS 11643 Conversion
20001 - Chinese (traditional) TCA Conversion
20002 - Chinese (traditional) Big5 (ETEN variant) Conversion
20003 ? Chinese (traditional) IBM 5500 Conversion
20004 - Chinese (traditional) Teletext Conversion
20005 - Chinese (traditional) Wang Conversion
20932 954 (roughly) Japanese EUC-JP Conversion

EBCDIC code pagesEdit

Unicode-related code pagesEdit

Macintosh compatibility code pagesEdit

  • 10000 - Apple Macintosh Roman
  • 10001 - Apple Macintosh Japanese
  • 10002 - Apple Macintosh Chinese (traditional) (BIG-5)
  • 10003 - Apple Macintosh Korean
  • 10004 - Apple Macintosh Arabic
  • 10005 - Apple Macintosh Hebrew
  • 10006 - Apple Macintosh Greek
  • 10007 - Apple Macintosh Cyrillic
  • 10008 - Apple Macintosh Chinese (simplified) (GB 2312)
  • 10010 - Apple Macintosh Romanian
  • 10017 - Apple Macintosh Ukrainian
  • 10021 - Apple Macintosh Thai
  • 10029 - Apple Macintosh Roman II / Central Europe
  • 10079 - Apple Macintosh Icelandic
  • 10081 - Apple Macintosh Turkish
  • 10082 - Apple Macintosh Croatian

ISO 8859 code pagesEdit

ITU-T code pagesEdit

KOI8 code pagesEdit

  • 20866 - Russian - KOI8-R
  • 21866 - Ukrainian - KOI8-U

Other code pagesEdit

Problems arising from the use of code pagesEdit

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 files correctly. If a program uses the wrong code page it may show text as mojibake.
  • The code page in use may differ between machines, so 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 alsoEdit

  • AppLocale — a utility to run non-Unicode (code page-based) applications in a locale of the user's choice.

ReferencesEdit

  1. ^ Code Pages, MSDN
  2. ^ a b MSDN: Glossary of Terms
  3. ^ IANA list of Character Sets
  4. ^ http://www.w3.org/TR/xml11/#charencoding
  5. ^ hylom (2017-11-14). "Windows 10のInsider PreviewでシステムロケールをUTF-8にするオプションが追加される" [The option to make UTF-8 the system locale added in Windows 10 Insider Preview]. スラド (in Japanese). Retrieved 2018-05-10.
  6. ^ "Character Sets". IANA.
  7. ^ Microsoft. "Windows 1250". Retrieved 2014-07-06.
  8. ^ IBM. "SBCS code page information document CPGID 01250". Retrieved 2014-07-06.
  9. ^ Microsoft. "Windows 1251". Retrieved 2014-07-06.
  10. ^ IBM. "SBCS code page information document CPGID 01251". Retrieved 2014-07-06.
  11. ^ Microsoft. "Windows 1252". Retrieved 2014-07-06.
  12. ^ IBM. "SBCS code page information document CPGID 01252". Retrieved 2014-07-06.
  13. ^ Microsoft. "Windows 1253". Retrieved 2014-07-06.
  14. ^ IBM. "SBCS code page information document CPGID 01253". Retrieved 2014-07-06.
  15. ^ Microsoft. "Windows 1254". Retrieved 2014-07-06.
  16. ^ IBM. "SBCS code page information document CPGID 01254". Retrieved 2014-07-06.
  17. ^ Microsoft. "Windows 1255". Retrieved 2014-07-06.
  18. ^ IBM. "SBCS code page information document CPGID 01255". Retrieved 2014-07-06.
  19. ^ Microsoft. "Windows 1256". Retrieved 2014-07-06.
  20. ^ IBM. "SBCS code page information document CPGID 01256". Retrieved 2014-07-06.
  21. ^ Microsoft. "Windows 1257". Retrieved 2014-07-06.
  22. ^ IBM. "SBCS code page information document CPGID 01257". Retrieved 2014-07-06.
  23. ^ Microsoft. "Windows 1258". Retrieved 2014-07-06.
  24. ^ IBM. "SBCS code page information document CPGID 01258". Retrieved 2014-07-06.
  25. ^ IBM. "SBCS code page information document - CPGID 00437". Retrieved 2014-07-04.
  26. ^ "Coded character set identifiers – CCSID 5471". IBM Globalization. IBM. Archived from the original on 2014-11-29.
  27. ^ IBM. "SBCS code page information document - CPGID 00037". Retrieved 2014-07-04.
  28. ^ Steele, Shawn (2005-09-12). "Code Page 21027 "Extended/Ext Alpha Lowercase"". MSDN.
  29. ^ Code Page Identifiers
  30. ^ Code page identifier list [1]
  31. ^ Code page identifier list [2]
  32. ^ Code page identifier list [3]
  33. ^ Code page identifier list [4]
  34. ^ a b c d e "Code Page Identifiers". Microsoft Developer Network. Microsoft. 2014. Archived from the original on 2016-06-19. Retrieved 2016-06-19.
  35. ^ a b c d e "Web Encodings - Internet Explorer - Encodings". WHATWG Wiki. 2012-10-23. Archived from the original on 2016-06-20. Retrieved 2016-06-20.
  36. ^ Foller, Antonin (2014) [2011]. "Western European (IA5) encoding - Windows charsets". WUtils.com - Online web utility and help. Motobit Software. Archived from the original on 2016-06-20. Retrieved 2016-06-20.
  37. ^ Foller, Antonin (2014) [2011]. "German (IA5) encoding - Windows charsets". WUtils.com - Online web utility and help. Motobit Software. Archived from the original on 2016-06-20. Retrieved 2016-06-20.
  38. ^ Foller, Antonin (2014) [2011]. "Swedish (IA5) encoding - Windows charsets". WUtils.com - Online web utility and help. Motobit Software. Archived from the original on 2016-06-20. Retrieved 2016-06-20.
  39. ^ Foller, Antonin (2014) [2011]. "Norwegian (IA5) encoding - Windows charsets". WUtils.com - Online web utility and help. Motobit Software. Archived from the original on 2016-06-20. Retrieved 2016-06-20.
  40. ^ Foller, Antonin (2014) [2011]. "US-ASCII encoding - Windows charsets". WUtils.com - Online web utility and help. Motobit Software. Archived from the original on 2016-06-20. Retrieved 2016-06-20.

External linksEdit