Windows-1252 or CP-1252 (code page 1252) is a single-byte character encoding of the Latin alphabet (with additions) that was used by default in Microsoft Windows for English and many Romance and Germanic languages including Spanish, Portuguese, French, and German (though missing uppercase ẞ). This character-encoding scheme is used throughout the Americas, Western Europe, Oceania, and much of Africa. All modern operating systems, including Windows, now use Unicode code points and text encodings by default, which are portable across all of the world's major languages. 

Single-byte characters encodings are compact and faster for many common string operations (especially random access), but have circumscribed portability due to the highly restricted character set. Even if extended to single-word encodings to enlarge the supported character set (becoming substantially less compact for Latin languages), legacy encodings rarely support any text processing feature beyond naive string semantics, such as bidirectional text, e.g. when combining Latin-alphabet text and Arabic or Hebrew text in the same string or document. Legacy components of Microsoft Windows originally coded to assume a uniform single-byte string representation commonly retain these limitations regardless of the evolution of the operating system, even if these components remain sufficiently compatible to continue to run in the more sophisticated environment. 

It is the most-used single-byte character encoding in the world. , 1.4% of all web sites declare ISO 8859-1 which is treated as Windows-1252 by all modern browsers (as demanded by the HTML5 standard), plus 0.3% of all websites declared use of Windows-1252, for a total of 1.7% (and only 16 of the top 1000 websites). Pages declared as ASCII, or a missing or invalid charset, are also assumed to be Windows-1252 by browsers.

Depending on the country or language, use can be much higher than the global average, e.g., for Brazil website use is at  9.2%, and in Germany at  3.9% (these are the sums of ISO-8859-1 and CP1252 declarations).

Windows-1252 is often assumed to be the encoding of text in operating systems, in particular on Microsoft Windows; this is only gradually being changed to UTF-8.

Details
This character encoding is a superset of ISO 8859-1 in terms of printable characters, but differs from the IANA's ISO-8859-1 by adding additional characters in the 80 to 9F (hex) range (the ISO standards reserve this range for control characters). Notable additional characters include curly quotation marks and all printable characters from ISO 8859-15. It is known to Windows by the code page number 1252, and by the IANA-approved name "windows-1252".

At one stage many Microsoft internet products produced text in Windows-1252 but marked as ISO-8859-1. A result was that all the quotes and apostrophes (produced by "smart quotes") were replaced with question marks or boxes when viewed on non-Windows operating systems. Most modern web browsers and e-mail clients treat the media type charset ISO-8859-1 as Windows-1252 to accommodate such mislabeling. This behavior is now required by the HTML5 specification. Browsers appear to treat the charset "ASCII" and missing charsets the same.

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."

In LaTeX packages, CP-1252 is referred to as "ansinew".

IBM uses code page 1252 (CCSID 1252 and euro sign extended CCSID 5348) for Windows-1252.

It is called "WE8MSWIN1252" by Oracle.

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 left 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 MultiByteToWideChar maps these to the corresponding C1 control codes. The "best fit" mapping documents this behavior, too.

History
 The first version of the codepage 1252 used in Microsoft Windows 1.0 did not have positions D7 and F7 defined. All the characters in the ranges 80–9F were undefined too.
 The second version, used in Microsoft Windows 2.0, positions D7, F7, 91, and 92 had been defined.
 The third version, used since Microsoft Windows 3.1, had all the present-day positions defined, except euro sign and Z with caron character pair.
 The final version listed above debuted in Microsoft Windows 98 and was ported to older versions of Windows with the euro symbol update.

OS/2 extensions
The OS/2 operating system supports an encoding by the name of Code page 1004 (CCSID 1004) or "Windows Extended". This mostly matches code page 1252, with the exception of certain C0 control characters being replaced by diacritic characters.

MSDOS 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.

Palm OS variant
This variant of Windows-1252 is used by Palm OS 3.5. Python gives it the  label.
Differences from Windows-1252 have their Unicode code point.

See also
 Latin script in Unicode
 Unicode
 Universal Coded Character Set
 European  Unicode subset (DIN 91379) 
 UTF-8
 Western Latin character sets (computing)
 Windows-1250
 Windows code pages
 ISO/IEC JTC 1/SC 2

References

External links
 Microsoft's code charts for Windows-1252 ("Code Page 1252 Windows Latin 1 (ANSI)")
 Unicode mapping table and code page definition with best fit mappings for Windows-1252

Windows code pages
Computer-related introductions in 1985