Windows-1252
Windows-1252 or CP-1252 is a character encoding of the Latin alphabet, used by default in the legacy components of Microsoft Windows in English and some other Western languages. It is one version within the group of Windows code pages.
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 using displayable characters rather than control characters in the 80 to 9F (hex) range. Notable additional characters include curly quotation marks and all the printable characters that are in ISO 8859-15. It is known to Windows by the code page number 1252, and by the IANA-approved name "windows-1252".
It is very common to mislabel Windows-1252 text with the charset label ISO-8859-1. A common result was that all the quotes and apostrophes (produced by "smart quotes" in word-processing software) were replaced with question marks or boxes on non-Windows operating systems, making text difficult to read. Most modern web browsers and e-mail clients treat the media type charset ISO-8859-1 as Windows-1252 to accommodate such mislabeling. This is now standard behavior in the HTML5 specification, which requires that documents advertised as ISO-8859-1 actually be parsed with the Windows-1252 encoding.[1] As of November 2016, 0.9% of all web sites used Windows-1252,[2][3] but at the same time 5.7% used ISO 8859-1,[2] which by HTML5 standards should be considered the same encoding, so that 6.6% of web sites effectively used Windows-1252.
Historically, the phrase "ANSI Code Page" (ACP) is used in Windows to refer to various code pages considered as native. 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."[4]
In LaTeX packages, CP-1252 is referred to as "ansinew".
Code page layout
The following table shows Windows-1252. Each character is shown with its Unicode equivalent and its decimal code. Conversions to Unicode are based on the Unicode.org mapping of Windows-1252 with "best fit".[5]
Legend:
Alphabetic
Control character
Numeric digit
Punctuation
|
Extended punctuation
Graphic character
International
Undefined
|
_0 | _1 | _2 | _3 | _4 | _5 | _6 | _7 | _8 | _9 | _A | _B | _C | _D | _E | _F | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0_ |
NUL 0000 0 |
SOH 0001 1 |
STX 0002 2 |
ETX 0003 3 |
EOT 0004 4 |
ENQ 0005 5 |
ACK 0006 6 |
BEL 0007 7 |
BS 0008 8 |
HT 0009 9 |
LF 000A 10 |
VT 000B 11 |
FF 000C 12 |
CR 000D 13 |
SO 000E 14 |
SI 000F 15 |
1_ |
DLE 0010 16 |
DC1 0011 17 |
DC2 0012 18 |
DC3 0013 19 |
DC4 0014 20 |
NAK 0015 21 |
SYN 0016 22 |
ETB 0017 23 |
CAN 0018 24 |
EM 0019 25 |
SUB 001A 26 |
ESC 001B 27 |
FS 001C 28 |
GS 001D 29 |
RS 001E 30 |
US 001F 31 |
2_ |
SP 0020 32 |
! 0021 33 |
" 0022 34 |
# 0023 35 |
$ 0024 36 |
% 0025 37 |
& 0026 38 |
' 0027 39 |
( 0028 40 |
) 0029 41 |
* 002A 42 |
+ 002B 43 |
, 002C 44 |
- 002D 45 |
. 002E 46 |
/ 002F 47 |
3_ |
0 0030 48 |
1 0031 49 |
2 0032 50 |
3 0033 51 |
4 0034 52 |
5 0035 53 |
6 0036 54 |
7 0037 55 |
8 0038 56 |
9 0039 57 |
: 003A 58 |
; 003B 59 |
< 003C 60 |
= 003D 61 |
> 003E 62 |
? 003F 63 |
4_ |
@ 0040 64 |
A 0041 65 |
B 0042 66 |
C 0043 67 |
D 0044 68 |
E 0045 69 |
F 0046 70 |
G 0047 71 |
H 0048 72 |
I 0049 73 |
J 004A 74 |
K 004B 75 |
L 004C 76 |
M 004D 77 |
N 004E 78 |
O 004F 79 |
5_ |
P 0050 80 |
Q 0051 81 |
R 0052 82 |
S 0053 83 |
T 0054 84 |
U 0055 85 |
V 0056 86 |
W 0057 87 |
X 0058 88 |
Y 0059 89 |
Z 005A 90 |
[ 005B 91 |
\ 005C 92 |
] 005D 93 |
^ 005E 94 |
_ 005F 95 |
6_ |
` 0060 96 |
a 0061 97 |
b 0062 98 |
c 0063 99 |
d 0064 100 |
e 0065 101 |
f 0066 102 |
g 0067 103 |
h 0068 104 |
i 0069 105 |
j 006A 106 |
k 006B 107 |
l 006C 108 |
m 006D 109 |
n 006E 110 |
o 006F 111 |
7_ |
p 0070 112 |
q 0071 113 |
r 0072 114 |
s 0073 115 |
t 0074 116 |
u 0075 117 |
v 0076 118 |
w 0077 119 |
x 0078 120 |
y 0079 121 |
z 007A 122 |
{ 007B 123 |
| 007C 124 |
} 007D 125 |
~ 007E 126 |
DEL 007F 127 |
8_ |
€ 20AC 128 |
‚ 201A 130 |
ƒ 0192 131 |
„ 201E 132 |
… 2026 133 |
† 2020 134 |
‡ 2021 135 |
ˆ 02C6 136 |
‰ 2030 137 |
Š 0160 138 |
‹ 2039 139 |
Œ 0152 140 |
Ž 017D 142 |
|||
9_ |
‘ 2018 145 |
’ 2019 146 |
“ 201C 147 |
” 201D 148 |
• 2022 149 |
– 2013 150 |
— 2014 151 |
˜ 02DC 152 |
™ 2122 153 |
š 0161 154 |
› 203A 155 |
œ 0153 156 |
ž 017E 158 |
Ÿ 0178 159 | ||
A_ |
NBSP 00A0 160 |
¡ 00A1 161 |
¢ 00A2 162 |
£ 00A3 163 |
¤ 00A4 164 |
¥ 00A5 165 |
¦ 00A6 166 |
§ 00A7 167 |
¨ 00A8 168 |
© 00A9 169 |
ª 00AA 170 |
« 00AB 171 |
¬ 00AC 172 |
SHY 00AD 173 |
® 00AE 174 |
¯ 00AF 175 |
B_ |
° 00B0 176 |
± 00B1 177 |
² 00B2 178 |
³ 00B3 179 |
´ 00B4 180 |
µ 00B5 181 |
¶ 00B6 182 |
· 00B7 183 |
¸ 00B8 184 |
¹ 00B9 185 |
º 00BA 186 |
» 00BB 187 |
¼ 00BC 188 |
½ 00BD 189 |
¾ 00BE 190 |
¿ 00BF 191 |
C_ |
À 00C0 192 |
Á 00C1 193 |
 00C2 194 |
à 00C3 195 |
Ä 00C4 196 |
Å 00C5 197 |
Æ 00C6 198 |
Ç 00C7 199 |
È 00C8 200 |
É 00C9 201 |
Ê 00CA 202 |
Ë 00CB 203 |
Ì 00CC 204 |
Í 00CD 205 |
Î 00CE 206 |
Ï 00CF 207 |
D_ |
Ð 00D0 208 |
Ñ 00D1 209 |
Ò 00D2 210 |
Ó 00D3 211 |
Ô 00D4 212 |
Õ 00D5 213 |
Ö 00D6 214 |
× 00D7 215 |
Ø 00D8 216 |
Ù 00D9 217 |
Ú 00DA 218 |
Û 00DB 219 |
Ü 00DC 220 |
Ý 00DD 221 |
Þ 00DE 222 |
ß 00DF 223 |
E_ |
à 00E0 224 |
á 00E1 225 |
â 00E2 226 |
ã 00E3 227 |
ä 00E4 228 |
å 00E5 229 |
æ 00E6 230 |
ç 00E7 231 |
è 00E8 232 |
é 00E9 233 |
ê 00EA 234 |
ë 00EB 235 |
ì 00EC 236 |
í 00ED 237 |
î 00EE 238 |
ï 00EF 239 |
F_ |
ð 00F0 240 |
ñ 00F1 241 |
ò 00F2 242 |
ó 00F3 243 |
ô 00F4 244 |
õ 00F5 245 |
ö 00F6 246 |
÷ 00F7 247 |
ø 00F8 248 |
ù 00F9 249 |
ú 00FA 250 |
û 00FB 251 |
ü 00FC 252 |
ý 00FD 253 |
þ 00FE 254 |
ÿ 00FF 255 |
_0 | _1 | _2 | _3 | _4 | _5 | _6 | _7 | _8 | _9 | _A | _B | _C | _D | _E | _F |
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.[5]
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-90 and 93-9F (i.e. except ‘ and ’) were undefined too.
- The second version, used in Microsoft Windows 2.0, positions D7 and F7 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.
See also
References
- ↑ "Encoding". WHATWG. 27 January 2015. sec. 5.2 Names and labels. Archived from the original on 4 February 2015. Retrieved 4 February 2015.
- 1 2 "Historical trends in the usage of character encodings, October 2016".
- ↑ "Frequenty Asked Questions".
- ↑ Wissink, Cathy (5 April 2002). "Unicode and Windows XP" (PDF). Microsoft. p. 1. Archived (PDF) from the original on 4 February 2015. Retrieved 4 February 2015.
- 1 2 "Unicode mappings of Windows-1252 with 'Best Fit'". Unicode. Archived from the original on 4 February 2015. Retrieved 4 February 2015.