Windows-1252

Windows-1252 or CP-1252 (code page 1252) is a single-byte character encoding of the Latin alphabet, used by default in the legacy components of Microsoft Windows for English and many European languages such as Spanish, French, and German.

Windows-1252
MIME / IANAwindows-1252[1]
Language(s)Basically all supported by ISO/IEC 8859-1 e.g. English, Irish, Italian, Norwegian, Portuguese, Spanish, Swedish. Plus also German, Finnish and French. And Dutch except the IJ character.
Created byMicrosoft
StandardWHATWG Encoding Standard
Classificationextended ASCII, Windows-125x
ExtendsISO 8859-1 (excluding C1 controls)
Transforms / EncodesISO 8859-15

It is the most-used single-byte character encoding in the world (especially if you include the compatible ASCII and ISO-8859-1 encodings). As of July 2020, 0.4% of all web sites declared use of Windows-1252,[2][3] but at the same time 2.0%[2] used ISO 8859-1 (while only 0.7% of top-1000 websites[4]), which by HTML5 standards should be considered the same encoding,[5] so that 2.4% of web sites effectively use Windows-1252.

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 (at different places than 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.[5]

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."[6]

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.[7][8][9]

Character set

The following table shows Windows-1252. Each character is shown with its Unicode equivalent based on the Unicode.org mapping of Windows-1252 with "best fit". The decimal numbers are the Alt code that can be used to type these on Windows systems.

Windows-1252 (CP1252)[10][11][12][13][14]
_0 _1 _2 _3 _4 _5 _6 _7 _8 _9 _A _B _C _D _E _F
0_
0
NUL
0000
0
SOH
0001
01
STX
0002
02
ETX
0003
03
EOT
0004
04
ENQ
0005
05
ACK
0006
06
BEL
0007
07
BS
0008
08
HT
0009
09
LF
000A
010
VT
000B
011
FF
000C
012
CR
000D
013
SO
000E
014
SI
000F
015
1_
16
DLE
0010
016
DC1
0011
017
DC2
0012
018
DC3
0013
019
DC4
0014
020
NAK
0015
021
SYN
0016
022
ETB
0017
023
CAN
0018
024
EM
0019
025
SUB
001A
026
ESC
001B
027
FS
001C
028
GS
001D
029
RS
001E
030
US
001F
031
2_
32
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_
48
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_
64
@
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_
80
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_
96
`
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_
112
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
0127
8_
128

20AC
0128
 
201A
0130
ƒ
0192
0131

201E
0132

2026
0133

2020
0134

2021
0135
ˆ
02C6
0136

2030
0137
Š
0160
0138

2039
0139
Œ
0152
0140
  Ž
017D
0142
 
9_
144
 
2018
0145

2019
0146

201C
0147

201D
0148

2022
0149

2013
0150

2014
0151
˜ 
02DC
0152

2122
0153
š
0161
0154

203A
0155
œ
0153
0156
  ž
017E
0158
Ÿ
0178
0159
A_
160
NBSP
00A0
0160
¡
00A1
0161
¢
00A2
0162
£
00A3
0163
¤
00A4
0164
¥
00A5
0165
¦
00A6
0166
§
00A7
0167
¨
00A8
0168
©
00A9
0169
ª
00AA
0170
«
00AB
0171
¬
00AC
0172
SHY
00AD
0173
®
00AE
0174
¯
00AF
0175
B_
176
°
00B0
0176
±
00B1
0177
²
00B2
0178
³
00B3
0179
´
00B4
0180
µ
00B5
0181

00B6
0182
·
00B7
0183
¸
00B8
0184
¹
00B9
0185
º
00BA
0186
»
00BB
0187
¼
00BC
0188
½
00BD
0189
¾
00BE
0190
¿
00BF
0191
C_
192
À
00C0
0192
Á
00C1
0193
Â
00C2
0194
Ã
00C3
0195
Ä
00C4
0196
Å
00C5
0197
Æ
00C6
0198
Ç
00C7
0199
È
00C8
0200
É
00C9
0201
Ê
00CA
0202
Ë
00CB
0203
Ì
00CC
0204
Í
00CD
0205
Î
00CE
0206
Ï
00CF
0207
D_
208
Ð
00D0
0208
Ñ
00D1
0209
Ò
00D2
0210
Ó
00D3
0211
Ô
00D4
0212
Õ
00D5
0213
Ö
00D6
0214
×
00D7
0215
Ø
00D8
0216
Ù
00D9
0217
Ú
00DA
0218
Û
00DB
0219
Ü
00DC
0220
Ý
00DD
0221
Þ
00DE
0222
ß
00DF
0223
E_
224
à
00E0
0224
á
00E1
0225
â
00E2
0226
ã
00E3
0227
ä
00E4
0228
å
00E5
0229
æ
00E6
0230
ç
00E7
0231
è
00E8
0232
é
00E9
0233
ê
00EA
0234
ë
00EB
0235
ì
00EC
0236
í
00ED
0237
î
00EE
0238
ï
00EF
0239
F_
240
ð
00F0
0240
ñ
00F1
0241
ò
00F2
0242
ó
00F3
0243
ô
00F4
0244
õ
00F5
0245
ö
00F6
0246
÷
00F7
0247
ø
00F8
0248
ù
00F9
0249
ú
00FA
0250
û
00FB
0251
ü
00FC
0252
ý
00FD
0253
þ
00FE
0254
ÿ
00FF
0255

  Letter  Number  Punctuation  Symbol  Other  Undefined   Differences from ISO-8859-1

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.[10]

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".[15][16] This mostly matches code page 1252, with the exception of certain C0 control characters being replaced by diacritic characters.

Code page 1004 (differing rows only)[17][18][19][20]
_0 _1 _2 _3 _4 _5 _6 _7 _8 _9 _A _B _C _D _E _F
0_
0
NUL
0000
SOH
0001
STX
0002
ETX
0003
ˉ
02C9
˘
02D8
˙
02D9
BEL
0007
˚
02DA
HT
0009
˝
02DD
˛
02DB
ˇ
02C7
CR
000D
SO
000E
SI
000F

  Differences from Windows-1252

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[21]). It was used exclusively in its then EMEA region (Europe, Middle East & Africa). In time the programs were changed to use code page 850.

Graphics Extended Code Page 1252
_0 _1 _2 _3 _4 _5 _6 _7 _8 _9 _A _B _C _D _E _F
0_
0

25CB

25A0

2191

2193

2192

2190

2551

2550

2554

2557

255A

255D

2591

2592

25BA

25C4
1_
16

2502

2500

250C

2510

2514

2518

251C

2524

2534

252C

2666

253C

2588

2584

2580

25AC
gollark: Inasmuch as sometimes some implications are implied quite strongly and deliberately.
gollark: Actually, we reserve the right to make inferences at random and blame you for them.
gollark: Generalised Greenspun's law?
gollark: You're just making stupider Lua at this point.
gollark: Why does Dale have this?

See also

References

  1. Character Sets, Internet Assigned Numbers Authority (IANA), 2018-12-12
  2. "Historical trends in the usage of character encodings, July 2020". Retrieved 2020-07-23.
  3. "Frequently Asked Questions".
  4. "Usage Survey of Character Encodings broken down by Ranking". w3techs.com. Retrieved 2020-07-24.
  5. "Encoding". WHATWG. 27 January 2015. sec. 5.2 Names and labels. Archived from the original on 4 February 2015. Retrieved 4 February 2015.
  6. 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.
  7. "Code page 1252 information document". Archived from the original on 2016-03-03.
  8. "CCSID 1252 information document". Archived from the original on 2016-03-26.
  9. "CCSID 5348 information document". Archived from the original on 2014-11-29.
  10. "Unicode mappings of Windows-1252 with 'Best Fit'". Unicode. Archived from the original on 4 February 2015. Retrieved 4 February 2015.
  11. Code Page CPGID 01252 (pdf) (PDF), IBM
  12. Code Page CPGID 01252 (txt), IBM
  13. International Components for Unicode (ICU), ibm-1252_P100-2000.ucm, 2002-12-03
  14. International Components for Unicode (ICU), ibm-5348_P100-1997.ucm, 2002-12-03
  15. "Code page 1004 information document". Archived from the original on 2015-06-25.
  16. "CCSID 1004 information document". Archived from the original on 2016-03-26.
  17. "Code Page 01004" (PDF). IBM. Archived from the original (PDF) on 2015-07-08. (version based on Windows 3.1 version of Windows-1252)
  18. Code Page CPGID 01004 (pdf) (PDF), IBM
  19. Code Page CPGID 01004 (txt), IBM
  20. Borgendale, Ken (2001). "Codepage 1004 - Windows Extended". OS/2 codepages by number. Archived from the original on 2018-05-13. Retrieved 2018-05-13. (version based on current version of Windows-1252)
  21. "Performance of NASA Equation Solvers on Computational Mechanics Applications" (PDF). NASA.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.