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 the same as ISO 8859-1, it began to diverge starting in Windows 2.0 by adding additional characters in the 0x80 to 0x9F (hex) range (the ISO standards reserve this range for C1 control codes). 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. <!-- 5.6% or because of double-counting, 100-90.7 = --> (effectively) 9.3% of static web pages are served as Windows-1252 (and even more used of some subtypes or categories, see below). This contrasts a lot with only 0.3%), for a total of 1.2%, explained by the fact most web sites are served programmatically and/or usually with a mix of static pages. Almost all websites now use the multi-byte character encoding UTF-8, another superset of ASCII. Some countries or languages show a higher usage than that full lower global average, in 2025 Brazil according to website use, use is at<!-- arguably, adding together 6.3% (ISO-8859-1) + 0.3% (Windows-1252) = 6.6%, or because some pages include more than one encoding, likely better to show 100-97.8% = --> 2.2%, and in Germany at <!-- adding together 2.3% (ISO-8859-1) + 0.5% (Windows-1252) = 2.8% or because some pages include more than one encoding, 100-97.9% = --> 2.1%. (these are the sums of ISO-8859-1 and CP-1252 declarations).

<!--

(shortened alias) was (according to the standard, at least) the default encoding of documents delivered via HTTP with a MIME type beginning with , the default encoding of the values of certain descriptive HTTP headers, and defined the repertoire of characters allowed in HTML&nbsp;3.2 documents. It is specified by many other standards. In practice, the superset encoding Windows-1252 is the more likely effective default and it is increasingly common for UTF-8 to work whether or not a standard specifies it.

ISO-8859-1 is the IANA preferred name for this standard when supplemented with the C0 and C1 control codes from ISO/IEC 6429. The following other aliases are registered: iso-ir-100, csISOLatin1, latin1, l1, IBM819, Code page&nbsp;28591 a.k.a. Windows-28591 is used for it in Windows. IBM calls it code page&nbsp;819 or CP819 (CCSID&nbsp;819). Oracle calls it WE8ISO8859P1.

-->

HTML5 is the latest standard that almost all web pages use, but regarding older standards: 6.0% of HTML Transitional web pages use Windows-1252 (HTML Transitional is used by 2.9% of all the websites). <!-- HTML Strict has <!- I believe you can't add 17.0% here, since this isn't HTML5 -> 2.7% usage (note though HTML Strict is only used by 0.1% of websites). --> For the obsolete and little used frameset site element using websites (0.2% of all), 12.8% use Windows-1252. So it can be said that these legacy encodings are more used with older technology, and HTML5 mostly eliminate their use, and pre-HTML5-based HTML Transitional and HTML Strict.

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 (and more recently cp1252).

IBM uses code page 1252 (CCSID 1252 and euro sign extended CCSID 5348) 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 (including leaving code points 0xD7 and 0xF7 undefined, as they were not in the standard at that time).
  • 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 (shown below) was introduced in Microsoft Windows 98.

Starting in the 1990s, many Microsoft products that could produce HTML included Windows-1252-exclusive characters, but marked the encoding as ISO-8859-1, ASCII, or undeclared. Characters exclusive to Windows-1252 would render incorrectly on non-Windows operating systems (often as question marks). In particular, typographers' quotes—curly variants of the standard straight apostrophes and quotation marks in US-ASCII—were commonly used in files produced in Windows applications such as Microsoft Word due to the smart quotes feature, which can automatically convert straight apostrophes and quotation marks to the curly variants. To fix this, by 2000 most web browsers and e-mail clients treated the charsets ISO-8859-1 and US-ASCII as Windows-1252—this behavior is now required by the HTML5 specification. Undeclared charsets in HTML are also assumed to be Windows-1252.

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.

Code page 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 "best fit" mappings and Windows API <code>MultiByteToWideChar</code> map these to the corresponding C1 control codes. This mostly matches code page 1252, with the exception of certain C0 control characters being replaced by diacritic characters.

{|

|-

!

|

|

|

|

|

|

|

|

|

|

|

|

|

|

|

|

|}

MS-DOS extensions (rare)

There is a rarely used, but useful, graphics extended code page 1252 where codes 0x00 to 0x1f allow for box drawing as used in applications such as MSDOS Edit and Codeview. One of the applications to use this code page was an Intel Corporation Install/Recovery disk image utility from mid/late 1995. These programs were written for its P6 User Test Program machines (US example). It was used exclusively in its then EMEA region (Europe, Middle East & Africa). In time the programs were changed to use code page 850.

{|

|-

!

|

|

|

|

|

|

|

|

|

|

|

|

|

|

|

|

|-

!

|

|

|

|

|

|

|

|

|

|

|

|

|

|

|

|

|}

See also

  • Latin script in Unicode
  • Unicode
  • Universal Coded Character Set
  • European <!-- Latin --> Unicode subset (DIN 91379) <!-- (thus also Greek and Cyrillic for Bulgarian) -->
  • UTF-8
  • Western Latin character sets (computing)
  • Windows-1250
  • Windows code pages
  • ISO/IEC JTC 1/SC 2
  • Extended ASCII

Notes