Windows-1252

From Wikipedia, the free encyclopedia

Windows-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. In LaTeX packages, it is referred to as ansinew. The encoding is a superset of ISO 8859-1, but differs from the IANA's ISO-8859-1 by using displayable characters rather than control characters in the 0x80 to 0x9F range. It is known to Windows by the code page number 1252, and by the IANA-approved name "windows-1252". This code page also contains all the printable characters that are in ISO 8859-15 (though some are mapped to different code points).

The use of Unicode (often in UTF-8 form) is slowly replacing use of 8-bit "code pages" such as Windows-1252.

Many web browsers treat the MIME charset ISO-8859-1 as Windows-1252 (the extra control codes in ISO-8859-1 are forbidden in HTML anyway), and so codes from it are often seen in web pages that declare their encoding as ISO-8859-1. This is also true of e-mail programs. However, there can be difficulties from the use of such characters, particularly when the recipient is using a non-Windows system such as Linux or Mac OS, which may have assigned no meaning or a different proprietary set of characters to this range.

The term "ANSI code page" is also used to refer to code pages used in Windows, like Windows-1252. Even though Windows-1252 is considered an ANSI code page in Microsoft Windows parlance, the code page has never been standardized by ANSI. The name has been taken from an early ANSI draft, that later, was modified and became ISO-8859-1. Thus, Windows-1252 is a non-standard code page and is called an ANSI code page for historical reasons. Microsoft has stated that "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"[1].

[edit] Codepage layout

The following table shows Windows-1252, with differences from ISO-8859-1 outlined. Each character is shown with its Unicode equivalent right below and its decimal code at the bottom.

Windows-1252 (CP1252)
—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
 

129

201A
130
ƒ
0192
131

201E
132

2026
133

2020
134

2021
135
ˆ
02C6
136

2030
137
Š
0160
138

2039
139
Œ
0152
140
 

141
Ž
017D
142
 

143
 
9−
 
 

144

2018
145

2019
146

201C
147

201D
148

2022
149

2013
150

2014
151
˜
02DC
152

2122
153
š
0161
154

203A
155
œ
0153
156
 

157
ž
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

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 call for converting from code pages to Unicode maps these to the corresponding C1 control codes. The euro character at position 80 was not present in earlier versions of this code page, nor were the S and Z with caron (háček).

In English Windows, the characters from Windows-1252 can be inserted by holding down the Alt key and entering a zero followed by the character's three-digit decimal code on the numpad. (By omitting the zero one can also enter characters from the older code page 437 in this way.)

[edit] See also

[edit] External links