Windows-1252
Windows-1252 or CP-1252 is a legacy single-byte character encoding that is used by default in Microsoft Windows throughout the Americas, Western Europe, Oceania, and much of Africa.
Initially the same as ISO 8859-1, it began to diverge starting in Windows 2.0 by adding additional characters in the 0x80 to 0x9F range. Notable additional characters include curly quotation marks and all printable characters from ISO 8859-15.
It is the most-used single-byte character encoding in the world. Although almost all websites now use the multi-byte character encoding UTF-8, as of 2025, 0.9% of websites declared ISO 8859-1 which is treated as Windows-1252 by all modern browsers, plus 0.3% declared Windows-1252 directly, for a total of 1.2%. Some countries or languages show a higher usage than the global average, in 2025 Brazil according to website use, use is at 2.3%, and in Germany at 2.3%.
Name
It is known to Windows by the code page number 1252, and by the IANA-approved name "windows-1252".Historically, the phrase "ANSI Code Page" was used in Windows to refer to non-DOS encodings; the intention was that most of these would be ANSI standards such as ISO-8859-1. Even though Windows-1252 was the first and by far most popular code page named so in Microsoft Windows parlance, the code page has never been an ANSI standard. Microsoft explains, "The term ANSI as used to signify Windows code pages is a historical reference, but is nowadays a misnomer that continues to persist in the Windows community."
LaTeX can input Windows-1252 by using inputenc.sty with parameter ansinew.
IBM uses code page 1252 for Windows-1252.
It is called "WE8MSWIN1252" by Oracle Database.
History
- The first version of the codepage was used in Microsoft Windows 1.0. It matched the ISO-8859-1 standard.
- The second version of the codepage was introduced in Microsoft Windows 2.0. In this version, code points 0xD7, 0xF7, 0x91, and 0x92 are defined.
- The third version of the codepage was introduced in Microsoft Windows 3.1. It defined all code points used in the final version except the euro sign and the Z with caron character pair.
- The final version was introduced in Microsoft Windows 98.
Although Windows NT supported Unicode and attempted to encourage programs to use it, it only provided the 16-bit code units of UCS-2/UTF-16, despite the existing support for other multibyte character encodings such as Shift-JIS. As many applications preferred to use 8-bit strings, Windows-1252 remained the most popular encoding on Windows. UTF-8 has been supported since Windows 10 so this is gradually changing.
Codepage layout
The following table shows Windows-1252. Differences from ISO-8859-1 have the Unicode code point number below the character, based on the Unicode.org mapping of Windows-1252 with "best fit". A tooltip, generally available only when one points to the immediate right of the character, shows the Unicode code point name and the decimal Alt code.According to the information on Microsoft's and the Unicode Consortium's websites, positions 81, 8D, 8F, 90, and 9D are unused; however, the Windows API
maps these to the corresponding C1 control codes. The "best fit" mapping documents this behavior, too.