2.6.5. ANSI character encoding and Windows 1252
In order to support English and Western European characters, Windows designed a code that corresponds to the code page number 1252, which is called Windows 1252.
The design of Windows 1252 is a reference to the ANSI draft (ANSI Draft).
The ANSI draft later developed into a formal international standard: ISO 8859-1
That is, Windows 1252 was designed before it became the official standard ISO 8859-1, so it is easy to understand that Windows 1252 and ISO 8859-1 are not exactly equivalent.
Here is a brief talk about the difference between the two.
2.6.5.1. Differences between Windows 1252 and ISO 8859-1
Windows 1252 and ISO 8859-1 are basically equivalent
Somewhat different is the value of the range in 128-159 (0x80-0x9f), which is encoded as a control character in ISO 8859-1, while Microsoft encodes the printable character.
|
windows 1252 vs. ANSI |
- Why Windows-like code Page was mistakenly called ANSI code Page,windows 1252 is also mistaken for ANSI encoding, so it is also It can be said that the difference between ANSI encoding and ISO 8859-1.
- and since ISO 8859-1 corresponds to the Latin-1 of the Western European language, this can also be referred to as the difference between ANSI encoding and ISO Latin-1, such as [+]
-
This variant of Microsoft, there are various names: Ansi/windows-1252/windows Latin-1 Even some Microsoft programs call it Western European (Windows). More even, because it is not clear, it is wrong to call it ASCII
|
|
Content containing Lattin-1 displayed garbled in Notepad |
Therefore, if you put a file that contains ISO Latin-1 encoded in the range of 128-159, and use Windows Notepad Notepad to save as ANSI, it will cause the file contents to be incorrectly handled. Because of those 128-159 characters of itself, it is the control character, but it is recognized by Notepad as printable character. |
In short, for Windows 1252, the current variety of names can be understood as:
ANSI = Windows 1252 = CP 1252 = Windows code page 1252 = Windows Latin-1
http://www.crifan.com/files/doc/docbook/char_encoding/release/html/char_encoding.html#ansi_and_windows_1252
Http://vlaurie.com/computers2/Articles/characters.htm
Https://zh.wikipedia.org/wiki/ISO/IEC_8859-1
The difference between Windows 1252 and ISO 8859-1 (ISO 8859-1 is Latin-1, but 1252 is slightly different from Latin1)