1 /* charsets.c -- character set information and mappings
3 (c) 1998-2004 (W3C) MIT, ERCIM, Keio University
4 See tidy.h for the copyright notice.
6 $Id: charsets.c 5895 2008-09-05 10:08:59Z jtuc $
8 * Changes 2005-01-09 Jochen Tucht
9 This file originates from the Tidy library (tidy.sourceforge.net).
10 Dependencies on other parts of the library have been removed to make it
11 easily plug into a Win32 application that does not use Tidy elsewhere.
12 Runtime-allocated indexes have been added to improve lookup speed.
21 /* todo: documentation of table and data */
22 /* todo: integration of data and routines */
23 /* todo: minor cleanup for ambiguous relations */
24 static struct _charsetInfo
30 } const charsetInfo[] =
32 { 1, "Adobe-Standard-Encoding", 0, no }, /* IANA */
33 { 1, "csAdobeStandardEncoding", 0, no }, /* IANA */
34 { 2, "Adobe-Symbol-Encoding", 0, no }, /* IANA */
35 { 2, "csHPPSMath", 0, no }, /* IANA */
36 { 3, "iso-ir-99", 0, no }, /* IANA */
37 { 3, "ANSI_X3.110-1983", 0, no }, /* IANA */
38 { 3, "CSA_T500-1983", 0, no }, /* IANA */
39 { 3, "NAPLPS", 0, no }, /* IANA */
40 { 3, "csISO99NAPLPS", 0, no }, /* IANA */
41 { 4, "US-ASCII", 20127, no }, /* IANA */
42 { 4, "iso-ir-6", 20127, no }, /* IANA */
43 { 4, "ANSI_X3.4-1968", 20127, no }, /* IANA */
44 { 4, "ANSI_X3.4-1986", 20127, no }, /* IANA */
45 { 4, "ISO_646.irv:1991", 20127, no }, /* IANA */
46 { 4, "ascii", 20127, no }, /* IANA */
47 { 4, "ISO646-US", 20127, no }, /* IANA */
48 { 4, "us", 20127, no }, /* IANA */
49 { 4, "IBM367", 20127, no }, /* IANA */
50 { 4, "cp367", 20127, no }, /* IANA */
51 { 4, "csASCII", 20127, no }, /* IANA */
52 { 4, "iso-ir-6us", 20127, no }, /* MICROSOFT */
53 { 5, "iso-ir-89", 0, no }, /* IANA */
54 { 5, "ASMO_449", 0, no }, /* IANA */
55 { 5, "ISO_9036", 0, no }, /* IANA */
56 { 5, "arabic7", 0, no }, /* IANA */
57 { 5, "csISO89ASMO449", 0, no }, /* IANA */
58 { 6, "Big5", 950, no }, /* IANA */
59 { 6, "csBig5", 950, no }, /* IANA */
60 { 6, "cn-big5", 950, no }, /* MICROSOFT */
61 { 6, "x-x-big5", 950, no }, /* MICROSOFT */
62 { 7, "Big5-HKSCS", 950, no }, /* IANA */
63 { 7, "cn-big5", 950, no }, /* MICROSOFT */
64 { 7, "x-x-big5", 950, no }, /* MICROSOFT */
65 { 8, "BOCU-1", 0, no }, /* IANA */
66 { 8, "csBOCU-1", 0, no }, /* IANA */
67 { 9, "iso-ir-4", 0, no }, /* IANA */
68 { 9, "BS_4730", 0, no }, /* IANA */
69 { 9, "ISO646-GB", 0, no }, /* IANA */
70 { 9, "gb", 0, no }, /* IANA */
71 { 9, "uk", 0, no }, /* IANA */
72 { 9, "csISO4UnitedKingdom", 0, no }, /* IANA */
73 { 10, "iso-ir-47", 0, no }, /* IANA */
74 { 10, "BS_viewdata", 0, no }, /* IANA */
75 { 10, "csISO47BSViewdata", 0, no }, /* IANA */
76 { 11, "CESU-8", 0, no }, /* IANA */
77 { 11, "csCESU-8", 0, no }, /* IANA */
78 { 12, "iso-ir-121", 0, no }, /* IANA */
79 { 12, "CSA_Z243.4-1985-1", 0, no }, /* IANA */
80 { 12, "ISO646-CA", 0, no }, /* IANA */
81 { 12, "csa7-1", 0, no }, /* IANA */
82 { 12, "ca", 0, no }, /* IANA */
83 { 12, "csISO121Canadian1", 0, no }, /* IANA */
84 { 13, "iso-ir-122", 0, no }, /* IANA */
85 { 13, "CSA_Z243.4-1985-2", 0, no }, /* IANA */
86 { 13, "ISO646-CA2", 0, no }, /* IANA */
87 { 13, "csa7-2", 0, no }, /* IANA */
88 { 13, "csISO122Canadian2", 0, no }, /* IANA */
89 { 14, "iso-ir-123", 0, no }, /* IANA */
90 { 14, "CSA_Z243.4-1985-gr", 0, no }, /* IANA */
91 { 14, "csISO123CSAZ24341985gr", 0, no }, /* IANA */
92 { 15, "iso-ir-139", 0, no }, /* IANA */
93 { 15, "CSN_369103", 0, no }, /* IANA */
94 { 15, "csISO139CSN369103", 0, no }, /* IANA */
95 { 16, "DEC-MCS", 0, no }, /* IANA */
96 { 16, "dec", 0, no }, /* IANA */
97 { 16, "csDECMCS", 0, no }, /* IANA */
98 { 17, "iso-ir-21", 20106, no }, /* IANA */
99 { 17, "DIN_66003", 20106, no }, /* IANA */
100 { 17, "de", 20106, no }, /* IANA */
101 { 17, "ISO646-DE", 20106, no }, /* IANA */
102 { 17, "csISO21German", 20106, no }, /* IANA */
103 { 17, "x-ia5-german", 20106, no }, /* MICROSOFT */
104 { 18, "dk-us", 0, no }, /* IANA */
105 { 18, "csDKUS", 0, no }, /* IANA */
106 { 19, "DS_2089", 0, no }, /* IANA */
107 { 19, "DS2089", 0, no }, /* IANA */
108 { 19, "ISO646-DK", 0, no }, /* IANA */
109 { 19, "dk", 0, no }, /* IANA */
110 { 19, "csISO646Danish", 0, no }, /* IANA */
111 { 20, "EBCDIC-AT-DE", 0, no }, /* IANA */
112 { 20, "csIBMEBCDICATDE", 0, no }, /* IANA */
113 { 21, "EBCDIC-AT-DE-A", 0, no }, /* IANA */
114 { 21, "csEBCDICATDEA", 0, no }, /* IANA */
115 { 22, "EBCDIC-CA-FR", 0, no }, /* IANA */
116 { 22, "csEBCDICCAFR", 0, no }, /* IANA */
117 { 23, "EBCDIC-DK-NO", 0, no }, /* IANA */
118 { 23, "csEBCDICDKNO", 0, no }, /* IANA */
119 { 24, "EBCDIC-DK-NO-A", 0, no }, /* IANA */
120 { 24, "csEBCDICDKNOA", 0, no }, /* IANA */
121 { 25, "EBCDIC-ES", 0, no }, /* IANA */
122 { 25, "csEBCDICES", 0, no }, /* IANA */
123 { 26, "EBCDIC-ES-A", 0, no }, /* IANA */
124 { 26, "csEBCDICESA", 0, no }, /* IANA */
125 { 27, "EBCDIC-ES-S", 0, no }, /* IANA */
126 { 27, "csEBCDICESS", 0, no }, /* IANA */
127 { 28, "EBCDIC-FI-SE", 0, no }, /* IANA */
128 { 28, "csEBCDICFISE", 0, no }, /* IANA */
129 { 29, "EBCDIC-FI-SE-A", 0, no }, /* IANA */
130 { 29, "csEBCDICFISEA", 0, no }, /* IANA */
131 { 30, "EBCDIC-FR", 0, no }, /* IANA */
132 { 30, "csEBCDICFR", 0, no }, /* IANA */
133 { 31, "EBCDIC-IT", 0, no }, /* IANA */
134 { 31, "csEBCDICIT", 0, no }, /* IANA */
135 { 32, "EBCDIC-PT", 0, no }, /* IANA */
136 { 32, "csEBCDICPT", 0, no }, /* IANA */
137 { 33, "EBCDIC-UK", 0, no }, /* IANA */
138 { 33, "csEBCDICUK", 0, no }, /* IANA */
139 { 34, "EBCDIC-US", 0, no }, /* IANA */
140 { 34, "csEBCDICUS", 0, no }, /* IANA */
141 { 35, "iso-ir-111", 0, no }, /* IANA */
142 { 35, "ECMA-cyrillic", 0, no }, /* IANA */
143 { 35, "csISO111ECMACyrillic", 0, no }, /* IANA */
144 { 36, "iso-ir-17", 0, no }, /* IANA */
145 { 36, "ES", 0, no }, /* IANA */
146 { 36, "ISO646-ES", 0, no }, /* IANA */
147 { 36, "csISO17Spanish", 0, no }, /* IANA */
148 { 37, "iso-ir-85", 0, no }, /* IANA */
149 { 37, "ES2", 0, no }, /* IANA */
150 { 37, "ISO646-ES2", 0, no }, /* IANA */
151 { 37, "csISO85Spanish2", 0, no }, /* IANA */
152 { 38, "EUC-KR", 51949, no }, /* IANA */
153 { 38, "csEUCKR", 51949, no }, /* IANA */
154 { 39, "Extended_UNIX_Code_Fixed_Width_for_Japanese", 0, no }, /* IANA */
155 { 39, "csEUCFixWidJapanese", 0, no }, /* IANA */
156 { 40, "EUC-JP", 51932, no }, /* IANA */
157 { 40, "Extended_UNIX_Code_Packed_Format_for_Japanese", 51932, no }, /* IANA */
158 { 40, "csEUCPkdFmtJapanese", 51932, no }, /* IANA */
159 { 40, "x-euc-jp", 51932, no }, /* MICROSOFT */
160 { 40, "x-euc", 51932, no }, /* MICROSOFT */
161 { 41, "GB18030", 54936, no }, /* IANA */
162 { 42, "GB2312", 936, no }, /* IANA */
163 { 42, "csGB2312", 936, no }, /* IANA */
164 { 42, "csgb231280", 936, no }, /* MICROSOFT */
165 { 42, "gb2312-80", 936, no }, /* MICROSOFT */
166 { 42, "gb231280", 936, no }, /* MICROSOFT */
167 { 42, "cn-gb", 936, no }, /* MICROSOFT */
168 { 43, "iso-ir-57", 0, no }, /* IANA */
169 { 43, "GB_1988-80", 0, no }, /* IANA */
170 { 43, "cn", 0, no }, /* IANA */
171 { 43, "ISO646-CN", 0, no }, /* IANA */
172 { 43, "csISO57GB1988", 0, no }, /* IANA */
173 { 44, "iso-ir-58", 936, no }, /* IANA */
174 { 44, "GB_2312-80", 936, no }, /* IANA */
175 { 44, "chinese", 936, no }, /* IANA */
176 { 44, "csISO58GB231280", 936, no }, /* IANA */
177 { 44, "csgb231280", 936, no }, /* MICROSOFT */
178 { 44, "gb2312-80", 936, no }, /* MICROSOFT */
179 { 44, "gb231280", 936, no }, /* MICROSOFT */
180 { 44, "cn-gb", 936, no }, /* MICROSOFT */
181 { 45, "GBK", 936, no }, /* IANA */
182 { 45, "CP936", 936, no }, /* IANA */
183 { 45, "MS936", 936, no }, /* IANA */
184 { 45, "Windows-936", 936, no }, /* IANA */
185 { 45, "csgb231280", 936, no }, /* MICROSOFT */
186 { 45, "gb2312-80", 936, no }, /* MICROSOFT */
187 { 45, "gb231280", 936, no }, /* MICROSOFT */
188 { 45, "cn-gb", 936, no }, /* MICROSOFT */
189 { 46, "iso-ir-153", 0, no }, /* IANA */
190 { 46, "GOST_19768-74", 0, no }, /* IANA */
191 { 46, "ST_SEV_358-88", 0, no }, /* IANA */
192 { 46, "csISO153GOST1976874", 0, no }, /* IANA */
193 { 47, "iso-ir-150", 0, no }, /* IANA */
194 { 47, "greek-ccitt", 0, no }, /* IANA */
195 { 47, "csISO150", 0, no }, /* IANA */
196 { 47, "csISO150GreekCCITT", 0, no }, /* IANA */
197 { 48, "iso-ir-88", 0, no }, /* IANA */
198 { 48, "greek7", 0, no }, /* IANA */
199 { 48, "csISO88Greek7", 0, no }, /* IANA */
200 { 49, "iso-ir-18", 0, no }, /* IANA */
201 { 49, "greek7-old", 0, no }, /* IANA */
202 { 49, "csISO18Greek7Old", 0, no }, /* IANA */
203 { 50, "HP-DeskTop", 0, no }, /* IANA */
204 { 50, "csHPDesktop", 0, no }, /* IANA */
205 { 51, "HP-Legal", 0, no }, /* IANA */
206 { 51, "csHPLegal", 0, no }, /* IANA */
207 { 52, "HP-Math8", 0, no }, /* IANA */
208 { 52, "csHPMath8", 0, no }, /* IANA */
209 { 53, "HP-Pi-font", 0, no }, /* IANA */
210 { 53, "csHPPiFont", 0, no }, /* IANA */
211 { 54, "hp-roman8", 0, no }, /* IANA */
212 { 54, "roman8", 0, no }, /* IANA */
213 { 54, "r8", 0, no }, /* IANA */
214 { 54, "csHPRoman8", 0, no }, /* IANA */
215 { 55, "HZ-GB-2312", 52936, yes }, /* IANA */
216 { 56, "IBM-Symbols", 0, no }, /* IANA */
217 { 56, "csIBMSymbols", 0, no }, /* IANA */
218 { 57, "IBM-Thai", 20838, no }, /* IANA */
219 { 57, "csIBMThai", 20838, no }, /* IANA */
220 { 57, "x-ebcdic-thai", 20838, no }, /* MICROSOFT */
221 { 58, "IBM00858", 858, no }, /* IANA */
222 { 58, "CCSID00858", 858, no }, /* IANA */
223 { 58, "CP00858", 858, no }, /* IANA */
224 { 58, "PC-Multilingual-850+euro", 858, no }, /* IANA */
225 { 59, "IBM00924", 20924, no }, /* IANA */
226 { 59, "CCSID00924", 20924, no }, /* IANA */
227 { 59, "CP00924", 20924, no }, /* IANA */
228 { 59, "ebcdic-Latin9--euro", 20924, no }, /* IANA */
229 { 60, "IBM01140", 1140, no }, /* IANA */
230 { 60, "CCSID01140", 1140, no }, /* IANA */
231 { 60, "CP01140", 1140, no }, /* IANA */
232 { 60, "ebcdic-us-37+euro", 1140, no }, /* IANA */
233 { 60, "x-ebcdic-cp-us-euro", 1140, no }, /* MICROSOFT */
234 { 61, "IBM01141", 1141, no }, /* IANA */
235 { 61, "CCSID01141", 1141, no }, /* IANA */
236 { 61, "CP01141", 1141, no }, /* IANA */
237 { 61, "ebcdic-de-273+euro", 1141, no }, /* IANA */
238 { 61, "x-ebcdic-germany-euro", 1141, no }, /* MICROSOFT */
239 { 62, "IBM01142", 1142, no }, /* IANA */
240 { 62, "CCSID01142", 1142, no }, /* IANA */
241 { 62, "CP01142", 1142, no }, /* IANA */
242 { 62, "ebcdic-dk-277+euro", 1142, no }, /* IANA */
243 { 62, "ebcdic-no-277+euro", 1142, no }, /* IANA */
244 { 62, "x-ebcdic-denmarknorway-euro", 1142, no }, /* MICROSOFT */
245 { 63, "IBM01143", 1143, no }, /* IANA */
246 { 63, "CCSID01143", 1143, no }, /* IANA */
247 { 63, "CP01143", 1143, no }, /* IANA */
248 { 63, "ebcdic-fi-278+euro", 1143, no }, /* IANA */
249 { 63, "ebcdic-se-278+euro", 1143, no }, /* IANA */
250 { 63, "x-ebcdic-france", 1143, no }, /* MICROSOFT */
251 { 63, "x-ebcdic-finlandsweden-euro", 1143, no }, /* MICROSOFT */
252 { 64, "IBM01144", 1144, no }, /* IANA */
253 { 64, "CCSID01144", 1144, no }, /* IANA */
254 { 64, "CP01144", 1144, no }, /* IANA */
255 { 64, "ebcdic-it-280+euro", 1144, no }, /* IANA */
256 { 64, "x-ebcdic-italy-euro", 1144, no }, /* MICROSOFT */
257 { 65, "IBM01145", 1145, no }, /* IANA */
258 { 65, "CCSID01145", 1145, no }, /* IANA */
259 { 65, "CP01145", 1145, no }, /* IANA */
260 { 65, "ebcdic-es-284+euro", 1145, no }, /* IANA */
261 { 65, "x-ebcdic-spain-euro", 1145, no }, /* MICROSOFT */
262 { 66, "IBM01146", 1146, no }, /* IANA */
263 { 66, "CCSID01146", 1146, no }, /* IANA */
264 { 66, "CP01146", 1146, no }, /* IANA */
265 { 66, "ebcdic-gb-285+euro", 1146, no }, /* IANA */
266 { 66, "x-ebcdic-uk-euro", 1146, no }, /* MICROSOFT */
267 { 67, "IBM01147", 1147, no }, /* IANA */
268 { 67, "CCSID01147", 1147, no }, /* IANA */
269 { 67, "CP01147", 1147, no }, /* IANA */
270 { 67, "ebcdic-fr-297+euro", 1147, no }, /* IANA */
271 { 67, "x-ebcdic-france-euro", 1147, no }, /* MICROSOFT */
272 { 68, "IBM01148", 1148, no }, /* IANA */
273 { 68, "CCSID01148", 1148, no }, /* IANA */
274 { 68, "CP01148", 1148, no }, /* IANA */
275 { 68, "ebcdic-international-500+euro", 1148, no }, /* IANA */
276 { 68, "x-ebcdic-international-euro", 1148, no }, /* MICROSOFT */
277 { 69, "IBM01149", 1149, no }, /* IANA */
278 { 69, "CCSID01149", 1149, no }, /* IANA */
279 { 69, "CP01149", 1149, no }, /* IANA */
280 { 69, "ebcdic-is-871+euro", 1149, no }, /* IANA */
281 { 69, "x-ebcdic-icelandic-euro", 1149, no }, /* MICROSOFT */
282 { 70, "IBM037", 37, no }, /* IANA */
283 { 70, "cp037", 37, no }, /* IANA */
284 { 70, "ebcdic-cp-us", 37, no }, /* IANA */
285 { 70, "ebcdic-cp-ca", 37, no }, /* IANA */
286 { 70, "ebcdic-cp-wt", 37, no }, /* IANA */
287 { 70, "ebcdic-cp-nl", 37, no }, /* IANA */
288 { 70, "csIBM037", 37, no }, /* IANA */
289 { 71, "IBM038", 0, no }, /* IANA */
290 { 71, "EBCDIC-INT", 0, no }, /* IANA */
291 { 71, "cp038", 0, no }, /* IANA */
292 { 71, "csIBM038", 0, no }, /* IANA */
293 { 72, "IBM1026", 1026, no }, /* IANA */
294 { 72, "CP1026", 1026, no }, /* IANA */
295 { 72, "csIBM1026", 1026, no }, /* IANA */
296 { 73, "IBM1047", 0, no }, /* IANA */
297 { 73, "IBM-1047", 0, no }, /* IANA */
298 { 74, "IBM273", 20273, no }, /* IANA */
299 { 74, "CP273", 20273, no }, /* IANA */
300 { 74, "csIBM273", 20273, no }, /* IANA */
301 { 74, "x-ebcdic-germany", 20273, no }, /* MICROSOFT */
302 { 75, "IBM274", 0, no }, /* IANA */
303 { 75, "EBCDIC-BE", 0, no }, /* IANA */
304 { 75, "CP274", 0, no }, /* IANA */
305 { 75, "csIBM274", 0, no }, /* IANA */
306 { 76, "IBM275", 0, no }, /* IANA */
307 { 76, "EBCDIC-BR", 0, no }, /* IANA */
308 { 76, "cp275", 0, no }, /* IANA */
309 { 76, "csIBM275", 0, no }, /* IANA */
310 { 77, "IBM277", 20277, no }, /* IANA */
311 { 77, "EBCDIC-CP-DK", 20277, no }, /* IANA */
312 { 77, "EBCDIC-CP-NO", 20277, no }, /* IANA */
313 { 77, "csIBM277", 20277, no }, /* IANA */
314 { 77, "x-ebcdic-denmarknorway", 20277, no }, /* MICROSOFT */
315 { 78, "IBM278", 20278, no }, /* IANA */
316 { 78, "CP278", 20278, no }, /* IANA */
317 { 78, "ebcdic-cp-fi", 20278, no }, /* IANA */
318 { 78, "ebcdic-cp-se", 20278, no }, /* IANA */
319 { 78, "csIBM278", 20278, no }, /* IANA */
320 { 78, "x-ebcdic-finlandsweden", 20278, no }, /* MICROSOFT */
321 { 79, "IBM280", 20280, no }, /* IANA */
322 { 79, "CP280", 20280, no }, /* IANA */
323 { 79, "ebcdic-cp-it", 20280, no }, /* IANA */
324 { 79, "csIBM280", 20280, no }, /* IANA */
325 { 79, "x-ebcdic-italy", 20280, no }, /* MICROSOFT */
326 { 80, "IBM281", 0, no }, /* IANA */
327 { 80, "EBCDIC-JP-E", 0, no }, /* IANA */
328 { 80, "cp281", 0, no }, /* IANA */
329 { 80, "csIBM281", 0, no }, /* IANA */
330 { 81, "IBM284", 20284, no }, /* IANA */
331 { 81, "CP284", 20284, no }, /* IANA */
332 { 81, "ebcdic-cp-es", 20284, no }, /* IANA */
333 { 81, "csIBM284", 20284, no }, /* IANA */
334 { 81, "x-ebcdic-spain", 20284, no }, /* MICROSOFT */
335 { 82, "IBM285", 20285, no }, /* IANA */
336 { 82, "CP285", 20285, no }, /* IANA */
337 { 82, "ebcdic-cp-gb", 20285, no }, /* IANA */
338 { 82, "csIBM285", 20285, no }, /* IANA */
339 { 82, "x-ebcdic-uk", 20285, no }, /* MICROSOFT */
340 { 83, "IBM290", 20290, no }, /* IANA */
341 { 83, "cp290", 20290, no }, /* IANA */
342 { 83, "EBCDIC-JP-kana", 20290, no }, /* IANA */
343 { 83, "csIBM290", 20290, no }, /* IANA */
344 { 83, "x-ebcdic-japanesekatakana", 20290, no }, /* MICROSOFT */
345 { 84, "IBM297", 20297, no }, /* IANA */
346 { 84, "cp297", 20297, no }, /* IANA */
347 { 84, "ebcdic-cp-fr", 20297, no }, /* IANA */
348 { 84, "csIBM297", 20297, no }, /* IANA */
349 { 85, "IBM420", 20420, no }, /* IANA */
350 { 85, "cp420", 20420, no }, /* IANA */
351 { 85, "ebcdic-cp-ar1", 20420, no }, /* IANA */
352 { 85, "csIBM420", 20420, no }, /* IANA */
353 { 85, "x-ebcdic-arabic", 20420, no }, /* MICROSOFT */
354 { 86, "IBM423", 20423, no }, /* IANA */
355 { 86, "cp423", 20423, no }, /* IANA */
356 { 86, "ebcdic-cp-gr", 20423, no }, /* IANA */
357 { 86, "csIBM423", 20423, no }, /* IANA */
358 { 86, "x-ebcdic-greek", 20423, no }, /* MICROSOFT */
359 { 87, "IBM424", 20424, no }, /* IANA */
360 { 87, "cp424", 20424, no }, /* IANA */
361 { 87, "ebcdic-cp-he", 20424, no }, /* IANA */
362 { 87, "csIBM424", 20424, no }, /* IANA */
363 { 87, "x-ebcdic-hebrew", 20424, no }, /* MICROSOFT */
364 { 88, "IBM437", 437, no }, /* IANA */
365 { 88, "cp437", 437, no }, /* IANA */
366 { 88, "437", 437, no }, /* IANA */
367 { 88, "csPC8CodePage437", 437, no }, /* IANA */
368 { 88, "codepage437", 437, no }, /* MICROSOFT */
369 { 88, "cspc8", 437, no }, /* MICROSOFT */
370 { 89, "IBM500", 500, no }, /* IANA */
371 { 89, "CP500", 500, no }, /* IANA */
372 { 89, "ebcdic-cp-be", 500, no }, /* IANA */
373 { 89, "ebcdic-cp-ch", 500, no }, /* IANA */
374 { 89, "csIBM500", 500, no }, /* IANA */
375 { 90, "IBM775", 775, no }, /* IANA */
376 { 90, "cp775", 775, no }, /* IANA */
377 { 90, "csPC775Baltic", 775, no }, /* IANA */
378 { 91, "IBM850", 850, no }, /* IANA */
379 { 91, "cp850", 850, no }, /* IANA */
380 { 91, "850", 850, no }, /* IANA */
381 { 91, "csPC850Multilingual", 850, no }, /* IANA */
382 { 92, "IBM851", 0, no }, /* IANA */
383 { 92, "cp851", 0, no }, /* IANA */
384 { 92, "851", 0, no }, /* IANA */
385 { 92, "csIBM851", 0, no }, /* IANA */
386 { 93, "IBM852", 852, no }, /* IANA */
387 { 93, "cp852", 852, no }, /* IANA */
388 { 93, "852", 852, no }, /* IANA */
389 { 93, "csPCp852", 852, no }, /* IANA */
390 { 94, "IBM855", 855, no }, /* IANA */
391 { 94, "cp855", 855, no }, /* IANA */
392 { 94, "855", 855, no }, /* IANA */
393 { 94, "csIBM855", 855, no }, /* IANA */
394 { 95, "IBM857", 857, no }, /* IANA */
395 { 95, "cp857", 857, no }, /* IANA */
396 { 95, "857", 857, no }, /* IANA */
397 { 95, "csIBM857", 857, no }, /* IANA */
398 { 96, "IBM860", 860, no }, /* IANA */
399 { 96, "cp860", 860, no }, /* IANA */
400 { 96, "860", 860, no }, /* IANA */
401 { 96, "csIBM860", 860, no }, /* IANA */
402 { 97, "IBM861", 861, no }, /* IANA */
403 { 97, "cp861", 861, no }, /* IANA */
404 { 97, "861", 861, no }, /* IANA */
405 { 97, "cp-is", 861, no }, /* IANA */
406 { 97, "csIBM861", 861, no }, /* IANA */
407 { 98, "IBM862", 862, no }, /* IANA */
408 { 98, "cp862", 862, no }, /* IANA */
409 { 98, "862", 862, no }, /* IANA */
410 { 98, "csPC862LatinHebrew", 862, no }, /* IANA */
411 { 98, "dos-862", 862, no }, /* MICROSOFT */
412 { 99, "IBM863", 863, no }, /* IANA */
413 { 99, "cp863", 863, no }, /* IANA */
414 { 99, "863", 863, no }, /* IANA */
415 { 99, "csIBM863", 863, no }, /* IANA */
416 { 100, "IBM864", 864, no }, /* IANA */
417 { 100, "cp864", 864, no }, /* IANA */
418 { 100, "csIBM864", 864, no }, /* IANA */
419 { 101, "IBM865", 865, no }, /* IANA */
420 { 101, "cp865", 865, no }, /* IANA */
421 { 101, "865", 865, no }, /* IANA */
422 { 101, "csIBM865", 865, no }, /* IANA */
423 { 102, "IBM866", 866, no }, /* IANA */
424 { 102, "cp866", 866, no }, /* IANA */
425 { 102, "866", 866, no }, /* IANA */
426 { 102, "csIBM866", 866, no }, /* IANA */
427 { 103, "IBM868", 0, no }, /* IANA */
428 { 103, "CP868", 0, no }, /* IANA */
429 { 103, "cp-ar", 0, no }, /* IANA */
430 { 103, "csIBM868", 0, no }, /* IANA */
431 { 104, "IBM869", 869, no }, /* IANA */
432 { 104, "cp869", 869, no }, /* IANA */
433 { 104, "869", 869, no }, /* IANA */
434 { 104, "cp-gr", 869, no }, /* IANA */
435 { 104, "csIBM869", 869, no }, /* IANA */
436 { 105, "IBM870", 870, no }, /* IANA */
437 { 105, "CP870", 870, no }, /* IANA */
438 { 105, "ebcdic-cp-roece", 870, no }, /* IANA */
439 { 105, "ebcdic-cp-yu", 870, no }, /* IANA */
440 { 105, "csIBM870", 870, no }, /* IANA */
441 { 106, "IBM871", 20871, no }, /* IANA */
442 { 106, "CP871", 20871, no }, /* IANA */
443 { 106, "ebcdic-cp-is", 20871, no }, /* IANA */
444 { 106, "csIBM871", 20871, no }, /* IANA */
445 { 106, "x-ebcdic-icelandic", 20871, no }, /* MICROSOFT */
446 { 107, "IBM880", 20880, no }, /* IANA */
447 { 107, "cp880", 20880, no }, /* IANA */
448 { 107, "EBCDIC-Cyrillic", 20880, no }, /* IANA */
449 { 107, "csIBM880", 20880, no }, /* IANA */
450 { 107, "x-ebcdic-cyrillicrussian", 20880, no }, /* MICROSOFT */
451 { 108, "IBM891", 0, no }, /* IANA */
452 { 108, "cp891", 0, no }, /* IANA */
453 { 108, "csIBM891", 0, no }, /* IANA */
454 { 109, "IBM903", 0, no }, /* IANA */
455 { 109, "cp903", 0, no }, /* IANA */
456 { 109, "csIBM903", 0, no }, /* IANA */
457 { 110, "IBM904", 0, no }, /* IANA */
458 { 110, "cp904", 0, no }, /* IANA */
459 { 110, "904", 0, no }, /* IANA */
460 { 110, "csIBBM904", 0, no }, /* IANA */
461 { 111, "IBM905", 20905, no }, /* IANA */
462 { 111, "CP905", 20905, no }, /* IANA */
463 { 111, "ebcdic-cp-tr", 20905, no }, /* IANA */
464 { 111, "csIBM905", 20905, no }, /* IANA */
465 { 111, "x-ebcdic-turkish", 20905, no }, /* MICROSOFT */
466 { 112, "IBM918", 0, no }, /* IANA */
467 { 112, "CP918", 0, no }, /* IANA */
468 { 112, "ebcdic-cp-ar2", 0, no }, /* IANA */
469 { 112, "csIBM918", 0, no }, /* IANA */
470 { 113, "iso-ir-143", 0, no }, /* IANA */
471 { 113, "IEC_P27-1", 0, no }, /* IANA */
472 { 113, "csISO143IECP271", 0, no }, /* IANA */
473 { 114, "iso-ir-49", 0, no }, /* IANA */
474 { 114, "INIS", 0, no }, /* IANA */
475 { 114, "csISO49INIS", 0, no }, /* IANA */
476 { 115, "iso-ir-50", 0, no }, /* IANA */
477 { 115, "INIS-8", 0, no }, /* IANA */
478 { 115, "csISO50INIS8", 0, no }, /* IANA */
479 { 116, "iso-ir-51", 0, no }, /* IANA */
480 { 116, "INIS-cyrillic", 0, no }, /* IANA */
481 { 116, "csISO51INISCyrillic", 0, no }, /* IANA */
482 { 117, "INVARIANT", 0, no }, /* IANA */
483 { 117, "csINVARIANT", 0, no }, /* IANA */
484 { 118, "ISO-10646-J-1", 0, no }, /* IANA */
485 { 119, "ISO-10646-UCS-2", 1200, no }, /* IANA */
486 { 119, "csUnicode", 1200, no }, /* IANA */
487 { 119, "Unicode", 1200, no }, /* MICROSOFT */
488 { 120, "ISO-10646-UCS-4", 0, no }, /* IANA */
489 { 120, "csUCS4", 0, no }, /* IANA */
490 { 121, "ISO-10646-UCS-Basic", 0, no }, /* IANA */
491 { 121, "csUnicodeASCII", 0, no }, /* IANA */
492 { 122, "ISO-10646-Unicode-Latin1", 0, no }, /* IANA */
493 { 122, "ISO-10646", 0, no }, /* IANA */
494 { 122, "csUnicodeLatin1", 0, no }, /* IANA */
495 { 123, "ISO-10646-UTF-1", 0, no }, /* IANA */
496 { 123, "csISO10646UTF1", 0, no }, /* IANA */
497 { 124, "ISO-2022-CN", 0, yes }, /* IANA */
498 { 125, "ISO-2022-CN-EXT", 0, yes }, /* IANA */
499 { 126, "ISO-2022-JP", 50220, yes }, /* IANA */
500 { 126, "csISO2022JP", 50220, yes }, /* IANA */
501 { 127, "ISO-2022-JP-2", 50221, yes }, /* IANA */
502 { 127, "csISO2022JP2", 50221, yes }, /* IANA */
503 { 128, "ISO-2022-KR", 50225, yes }, /* IANA */
504 { 128, "csISO2022KR", 50225, yes }, /* IANA */
505 { 129, "ISO-8859-1-Windows-3.0-Latin-1", 0, no }, /* IANA */
506 { 129, "csWindows30Latin1", 0, no }, /* IANA */
507 { 130, "ISO-8859-1-Windows-3.1-Latin-1", 0, no }, /* IANA */
508 { 130, "csWindows31Latin1", 0, no }, /* IANA */
509 { 131, "ISO-8859-10", 0, no }, /* IANA */
510 { 131, "iso-ir-157", 0, no }, /* IANA */
511 { 131, "l6", 0, no }, /* IANA */
512 { 131, "ISO_8859-10:1992", 0, no }, /* IANA */
513 { 131, "csISOLatin6", 0, no }, /* IANA */
514 { 131, "latin6", 0, no }, /* IANA */
515 { 132, "ISO-8859-13", 28603, no }, /* IANA */
516 { 133, "ISO-8859-14", 0, no }, /* IANA */
517 { 133, "iso-ir-199", 0, no }, /* IANA */
518 { 133, "iso-celtic", 0, no }, /* IANA */
519 { 133, "ISO_8859-14:1998", 0, no }, /* IANA */
520 { 133, "ISO_8859-14", 0, no }, /* IANA */
521 { 133, "latin8", 0, no }, /* IANA */
522 { 133, "l8", 0, no }, /* IANA */
523 { 134, "ISO-8859-15", 28605, no }, /* IANA */
524 { 134, "ISO_8859-15", 28605, no }, /* IANA */
525 { 134, "Latin-9", 28605, no }, /* IANA */
526 { 134, "l9", 28605, no }, /* MICROSOFT */
527 { 134, "latin9", 28605, no }, /* MICROSOFT */
528 { 135, "ISO-8859-16", 0, no }, /* IANA */
529 { 135, "iso-ir-226", 0, no }, /* IANA */
530 { 135, "ISO_8859-16:2001", 0, no }, /* IANA */
531 { 135, "ISO_8859-16", 0, no }, /* IANA */
532 { 135, "latin10", 0, no }, /* IANA */
533 { 135, "l10", 0, no }, /* IANA */
534 { 136, "ISO-8859-2-Windows-Latin-2", 0, no }, /* IANA */
535 { 136, "csWindows31Latin2", 0, no }, /* IANA */
536 { 137, "ISO-8859-9-Windows-Latin-5", 0, no }, /* IANA */
537 { 137, "csWindows31Latin5", 0, no }, /* IANA */
538 { 138, "iso-ir-90", 0, no }, /* IANA */
539 { 138, "csISO90", 0, no }, /* IANA */
540 { 139, "ISO-Unicode-IBM-1261", 0, no }, /* IANA */
541 { 139, "csUnicodeIBM1261", 0, no }, /* IANA */
542 { 140, "ISO-Unicode-IBM-1264", 0, no }, /* IANA */
543 { 140, "csUnicodeIBM1264", 0, no }, /* IANA */
544 { 141, "ISO-Unicode-IBM-1265", 0, no }, /* IANA */
545 { 141, "csUnicodeIBM1265", 0, no }, /* IANA */
546 { 142, "ISO-Unicode-IBM-1268", 0, no }, /* IANA */
547 { 142, "csUnicodeIBM1268", 0, no }, /* IANA */
548 { 143, "ISO-Unicode-IBM-1276", 0, no }, /* IANA */
549 { 143, "csUnicodeIBM1276", 0, no }, /* IANA */
550 { 144, "iso-ir-155", 0, no }, /* IANA */
551 { 144, "ISO_10367-box", 0, no }, /* IANA */
552 { 144, "csISO10367Box", 0, no }, /* IANA */
553 { 145, "iso-ir-98", 0, no }, /* IANA */
554 { 145, "ISO_2033-1983", 0, no }, /* IANA */
555 { 145, "e13b", 0, no }, /* IANA */
556 { 145, "csISO2033", 0, no }, /* IANA */
557 { 146, "iso-ir-37", 0, no }, /* IANA */
558 { 146, "ISO_5427", 0, no }, /* IANA */
559 { 146, "csISO5427Cyrillic", 0, no }, /* IANA */
560 { 147, "iso-ir-54", 0, no }, /* IANA */
561 { 147, "ISO_5427:1981", 0, no }, /* IANA */
562 { 147, "ISO5427Cyrillic1981", 0, no }, /* IANA */
563 { 148, "iso-ir-55", 0, no }, /* IANA */
564 { 148, "ISO_5428:1980", 0, no }, /* IANA */
565 { 148, "csISO5428Greek", 0, no }, /* IANA */
566 { 149, "ISO_646.basic:1983", 0, no }, /* IANA */
567 { 149, "ref", 0, no }, /* IANA */
568 { 149, "csISO646basic1983", 0, no }, /* IANA */
569 { 150, "iso-ir-2", 20105, no }, /* IANA */
570 { 150, "ISO_646.irv:1983", 20105, no }, /* IANA */
571 { 150, "irv", 20105, no }, /* IANA */
572 { 150, "csISO2IntlRefVersion", 20105, no }, /* IANA */
573 { 150, "x-ia5", 20105, no }, /* MICROSOFT */
574 { 151, "iso-ir-152", 0, no }, /* IANA */
575 { 151, "ISO_6937-2-25", 0, no }, /* IANA */
576 { 151, "csISO6937Add", 0, no }, /* IANA */
577 { 152, "iso-ir-142", 0, no }, /* IANA */
578 { 152, "ISO_6937-2-add", 0, no }, /* IANA */
579 { 152, "csISOTextComm", 0, no }, /* IANA */
580 { 153, "ISO-8859-1", 28591, no }, /* IANA */
581 { 153, "iso-ir-100", 28591, no }, /* IANA */
582 { 153, "ISO_8859-1:1987", 28591, no }, /* IANA */
583 { 153, "ISO_8859-1", 28591, no }, /* IANA */
584 { 153, "latin1", 28591, no }, /* IANA */
585 { 153, "l1", 28591, no }, /* IANA */
586 { 153, "IBM819", 28591, no }, /* IANA */
587 { 153, "CP819", 28591, no }, /* IANA */
588 { 153, "csISOLatin1", 28591, no }, /* IANA */
589 { 153, "iso8859-1", 28591, no }, /* MICROSOFT */
590 { 154, "ISO-8859-2", 28592, no }, /* IANA */
591 { 154, "iso-ir-101", 28592, no }, /* IANA */
592 { 154, "ISO_8859-2:1987", 28592, no }, /* IANA */
593 { 154, "ISO_8859-2", 28592, no }, /* IANA */
594 { 154, "latin2", 28592, no }, /* IANA */
595 { 154, "l2", 28592, no }, /* IANA */
596 { 154, "csISOLatin2", 28592, no }, /* IANA */
597 { 154, "iso8859-2", 28592, no }, /* MICROSOFT */
598 { 155, "ISO-8859-3", 28593, no }, /* IANA */
599 { 155, "iso-ir-109", 28593, no }, /* IANA */
600 { 155, "ISO_8859-3:1988", 28593, no }, /* IANA */
601 { 155, "ISO_8859-3", 28593, no }, /* IANA */
602 { 155, "latin3", 28593, no }, /* IANA */
603 { 155, "l3", 28593, no }, /* IANA */
604 { 155, "csISOLatin3", 28593, no }, /* IANA */
605 { 156, "ISO-8859-4", 28594, no }, /* IANA */
606 { 156, "iso-ir-110", 28594, no }, /* IANA */
607 { 156, "ISO_8859-4:1988", 28594, no }, /* IANA */
608 { 156, "ISO_8859-4", 28594, no }, /* IANA */
609 { 156, "latin4", 28594, no }, /* IANA */
610 { 156, "l4", 28594, no }, /* IANA */
611 { 156, "csISOLatin4", 28594, no }, /* IANA */
612 { 157, "ISO-8859-5", 28595, no }, /* IANA */
613 { 157, "iso-ir-144", 28595, no }, /* IANA */
614 { 157, "ISO_8859-5:1988", 28595, no }, /* IANA */
615 { 157, "ISO_8859-5", 28595, no }, /* IANA */
616 { 157, "cyrillic", 28595, no }, /* IANA */
617 { 157, "csISOLatinCyrillic", 28595, no }, /* IANA */
618 { 158, "ISO-8859-6-E", 0, no }, /* IANA */
619 { 158, "ISO_8859-6-E", 0, no }, /* IANA */
620 { 158, "csISO88596E", 0, no }, /* IANA */
621 { 159, "ISO-8859-6-I", 0, no }, /* IANA */
622 { 159, "ISO_8859-6-I", 0, no }, /* IANA */
623 { 159, "csISO88596I", 0, no }, /* IANA */
624 { 160, "ISO-8859-6", 28596, no }, /* IANA */
625 { 160, "iso-ir-127", 28596, no }, /* IANA */
626 { 160, "ISO_8859-6:1987", 28596, no }, /* IANA */
627 { 160, "ISO_8859-6", 28596, no }, /* IANA */
628 { 160, "ECMA-114", 28596, no }, /* IANA */
629 { 160, "arabic", 28596, no }, /* IANA */
630 { 160, "csISOLatinArabic", 28596, no }, /* IANA */
631 { 161, "ISO-8859-7", 28597, no }, /* IANA */
632 { 161, "iso-ir-126", 28597, no }, /* IANA */
633 { 161, "ISO_8859-7:1987", 28597, no }, /* IANA */
634 { 161, "ISO_8859-7", 28597, no }, /* IANA */
635 { 161, "ELOT_928", 28597, no }, /* IANA */
636 { 161, "ECMA-118", 28597, no }, /* IANA */
637 { 161, "greek", 28597, no }, /* IANA */
638 { 161, "greek8", 28597, no }, /* IANA */
639 { 161, "csISOLatinGreek", 28597, no }, /* IANA */
640 { 162, "ISO-8859-8-E", 0, no }, /* IANA */
641 { 162, "ISO_8859-8-E", 0, no }, /* IANA */
642 { 162, "csISO88598E", 0, no }, /* IANA */
643 { 163, "ISO-8859-8-I", 38598, no }, /* IANA */
644 { 163, "ISO_8859-8-I", 38598, no }, /* IANA */
645 { 163, "csISO88598I", 38598, no }, /* IANA */
646 { 164, "ISO-8859-8", 28598, no }, /* IANA */
647 { 164, "iso-ir-138", 28598, no }, /* IANA */
648 { 164, "ISO_8859-8:1988", 28598, no }, /* IANA */
649 { 164, "ISO_8859-8", 28598, no }, /* IANA */
650 { 164, "hebrew", 28598, no }, /* IANA */
651 { 164, "csISOLatinHebrew", 28598, no }, /* IANA */
652 { 164, "logical", 28598, no }, /* MICROSOFT */
653 { 164, "visual", 28598, no }, /* MICROSOFT */
654 { 165, "ISO-8859-9", 28599, no }, /* IANA */
655 { 165, "iso-ir-148", 28599, no }, /* IANA */
656 { 165, "ISO_8859-9:1989", 28599, no }, /* IANA */
657 { 165, "ISO_8859-9", 28599, no }, /* IANA */
658 { 165, "latin5", 28599, no }, /* IANA */
659 { 165, "l5", 28599, no }, /* IANA */
660 { 165, "csISOLatin5", 28599, no }, /* IANA */
661 { 166, "iso-ir-154", 0, no }, /* IANA */
662 { 166, "ISO_8859-supp", 0, no }, /* IANA */
663 { 166, "latin1-2-5", 0, no }, /* IANA */
664 { 166, "csISO8859Supp", 0, no }, /* IANA */
665 { 167, "iso-ir-15", 0, no }, /* IANA */
666 { 167, "IT", 0, no }, /* IANA */
667 { 167, "ISO646-IT", 0, no }, /* IANA */
668 { 167, "csISO15Italian", 0, no }, /* IANA */
669 { 168, "iso-ir-13", 0, no }, /* IANA */
670 { 168, "JIS_C6220-1969-jp", 0, no }, /* IANA */
671 { 168, "JIS_C6220-1969", 0, no }, /* IANA */
672 { 168, "katakana", 0, no }, /* IANA */
673 { 168, "x0201-7", 0, no }, /* IANA */
674 { 168, "csISO13JISC6220jp", 0, no }, /* IANA */
675 { 169, "iso-ir-14", 0, no }, /* IANA */
676 { 169, "JIS_C6220-1969-ro", 0, no }, /* IANA */
677 { 169, "jp", 0, no }, /* IANA */
678 { 169, "ISO646-JP", 0, no }, /* IANA */
679 { 169, "csISO14JISC6220ro", 0, no }, /* IANA */
680 { 170, "iso-ir-42", 0, no }, /* IANA */
681 { 170, "JIS_C6226-1978", 0, no }, /* IANA */
682 { 170, "csISO42JISC62261978", 0, no }, /* IANA */
683 { 171, "iso-ir-87", 0, no }, /* IANA */
684 { 171, "JIS_C6226-1983", 0, no }, /* IANA */
685 { 171, "x0208", 0, no }, /* IANA */
686 { 171, "JIS_X0208-1983", 0, no }, /* IANA */
687 { 171, "csISO87JISX0208", 0, no }, /* IANA */
688 { 172, "iso-ir-91", 0, no }, /* IANA */
689 { 172, "JIS_C6229-1984-a", 0, no }, /* IANA */
690 { 172, "jp-ocr-a", 0, no }, /* IANA */
691 { 172, "csISO91JISC62291984a", 0, no }, /* IANA */
692 { 173, "iso-ir-92", 0, no }, /* IANA */
693 { 173, "JIS_C6229-1984-b", 0, no }, /* IANA */
694 { 173, "ISO646-JP-OCR-B", 0, no }, /* IANA */
695 { 173, "jp-ocr-b", 0, no }, /* IANA */
696 { 173, "csISO92JISC62991984b", 0, no }, /* IANA */
697 { 174, "iso-ir-93", 0, no }, /* IANA */
698 { 174, "JIS_C6229-1984-b-add", 0, no }, /* IANA */
699 { 174, "jp-ocr-b-add", 0, no }, /* IANA */
700 { 174, "csISO93JIS62291984badd", 0, no }, /* IANA */
701 { 175, "iso-ir-94", 0, no }, /* IANA */
702 { 175, "JIS_C6229-1984-hand", 0, no }, /* IANA */
703 { 175, "jp-ocr-hand", 0, no }, /* IANA */
704 { 175, "csISO94JIS62291984hand", 0, no }, /* IANA */
705 { 176, "iso-ir-95", 0, no }, /* IANA */
706 { 176, "JIS_C6229-1984-hand-add", 0, no }, /* IANA */
707 { 176, "jp-ocr-hand-add", 0, no }, /* IANA */
708 { 176, "csISO95JIS62291984handadd", 0, no }, /* IANA */
709 { 177, "iso-ir-96", 0, no }, /* IANA */
710 { 177, "JIS_C6229-1984-kana", 0, no }, /* IANA */
711 { 177, "csISO96JISC62291984kana", 0, no }, /* IANA */
712 { 178, "JIS_Encoding", 0, no }, /* IANA */
713 { 178, "csJISEncoding", 0, no }, /* IANA */
714 { 179, "JIS_X0201", 0, no }, /* IANA */
715 { 179, "X0201", 0, no }, /* IANA */
716 { 179, "csHalfWidthKatakana", 0, no }, /* IANA */
717 { 180, "iso-ir-159", 0, no }, /* IANA */
718 { 180, "JIS_X0212-1990", 0, no }, /* IANA */
719 { 180, "x0212", 0, no }, /* IANA */
720 { 180, "csISO159JISX02121990", 0, no }, /* IANA */
721 { 181, "iso-ir-141", 0, no }, /* IANA */
722 { 181, "JUS_I.B1.002", 0, no }, /* IANA */
723 { 181, "ISO646-YU", 0, no }, /* IANA */
724 { 181, "js", 0, no }, /* IANA */
725 { 181, "yu", 0, no }, /* IANA */
726 { 181, "csISO141JUSIB1002", 0, no }, /* IANA */
727 { 182, "iso-ir-147", 0, no }, /* IANA */
728 { 182, "JUS_I.B1.003-mac", 0, no }, /* IANA */
729 { 182, "macedonian", 0, no }, /* IANA */
730 { 182, "csISO147Macedonian", 0, no }, /* IANA */
731 { 183, "iso-ir-146", 0, no }, /* IANA */
732 { 183, "JUS_I.B1.003-serb", 0, no }, /* IANA */
733 { 183, "serbian", 0, no }, /* IANA */
734 { 183, "csISO146Serbian", 0, no }, /* IANA */
735 { 184, "KOI8-R", 20866, no }, /* IANA */
736 { 184, "csKOI8R", 20866, no }, /* IANA */
737 { 184, "koi8", 20866, no }, /* MICROSOFT */
738 { 184, "koi", 20866, no }, /* MICROSOFT */
739 { 184, "koi8r", 20866, no }, /* MICROSOFT */
740 { 185, "KOI8-U", 21866, no }, /* IANA */
741 { 185, "koi8-ru", 21866, no }, /* MICROSOFT */
742 { 186, "iso-ir-149", 949, no }, /* IANA */
743 { 186, "KS_C_5601-1987", 949, no }, /* IANA */
744 { 186, "KS_C_5601-1989", 949, no }, /* IANA */
745 { 186, "KSC_5601", 949, no }, /* IANA */
746 { 186, "korean", 949, no }, /* IANA */
747 { 186, "csKSC56011987", 949, no }, /* IANA */
748 { 186, "ks_c_5601_1987", 949, no }, /* MICROSOFT */
749 { 186, "ksc5601", 949, no }, /* MICROSOFT */
750 { 186, "ks_c_5601", 949, no }, /* MICROSOFT */
751 { 187, "KSC5636", 0, no }, /* IANA */
752 { 187, "ISO646-KR", 0, no }, /* IANA */
753 { 187, "csKSC5636", 0, no }, /* IANA */
754 { 188, "iso-ir-19", 0, no }, /* IANA */
755 { 188, "latin-greek", 0, no }, /* IANA */
756 { 188, "csISO19LatinGreek", 0, no }, /* IANA */
757 { 189, "iso-ir-27", 0, no }, /* IANA */
758 { 189, "Latin-greek-1", 0, no }, /* IANA */
759 { 189, "csISO27LatinGreek1", 0, no }, /* IANA */
760 { 190, "iso-ir-158", 0, no }, /* IANA */
761 { 190, "latin-lap", 0, no }, /* IANA */
762 { 190, "lap", 0, no }, /* IANA */
763 { 190, "csISO158Lap", 0, no }, /* IANA */
764 { 191, "macintosh", 10000, no }, /* IANA */
765 { 191, "mac", 10000, no }, /* IANA */
766 { 191, "csMacintosh", 10000, no }, /* IANA */
767 { 192, "Microsoft-Publishing", 0, no }, /* IANA */
768 { 192, "csMicrosoftPublishing", 0, no }, /* IANA */
769 { 193, "MNEM", 0, no }, /* IANA */
770 { 193, "csMnem", 0, no }, /* IANA */
771 { 194, "MNEMONIC", 0, no }, /* IANA */
772 { 194, "csMnemonic", 0, no }, /* IANA */
773 { 195, "iso-ir-86", 0, no }, /* IANA */
774 { 195, "MSZ_7795.3", 0, no }, /* IANA */
775 { 195, "ISO646-HU", 0, no }, /* IANA */
776 { 195, "hu", 0, no }, /* IANA */
777 { 195, "csISO86Hungarian", 0, no }, /* IANA */
778 { 196, "iso-ir-9-1", 0, no }, /* IANA */
779 { 196, "NATS-DANO", 0, no }, /* IANA */
780 { 196, "csNATSDANO", 0, no }, /* IANA */
781 { 197, "iso-ir-9-2", 0, no }, /* IANA */
782 { 197, "NATS-DANO-ADD", 0, no }, /* IANA */
783 { 197, "csNATSDANOADD", 0, no }, /* IANA */
784 { 198, "iso-ir-8-1", 0, no }, /* IANA */
785 { 198, "NATS-SEFI", 0, no }, /* IANA */
786 { 198, "csNATSSEFI", 0, no }, /* IANA */
787 { 199, "iso-ir-8-2", 0, no }, /* IANA */
788 { 199, "NATS-SEFI-ADD", 0, no }, /* IANA */
789 { 199, "csNATSSEFIADD", 0, no }, /* IANA */
790 { 200, "iso-ir-151", 0, no }, /* IANA */
791 { 200, "NC_NC00-10:81", 0, no }, /* IANA */
792 { 200, "cuba", 0, no }, /* IANA */
793 { 200, "ISO646-CU", 0, no }, /* IANA */
794 { 200, "csISO151Cuba", 0, no }, /* IANA */
795 { 201, "iso-ir-69", 0, no }, /* IANA */
796 { 201, "NF_Z_62-010", 0, no }, /* IANA */
797 { 201, "ISO646-FR", 0, no }, /* IANA */
798 { 201, "fr", 0, no }, /* IANA */
799 { 201, "csISO69French", 0, no }, /* IANA */
800 { 202, "iso-ir-25", 0, no }, /* IANA */
801 { 202, "NF_Z_62-010_(1973)", 0, no }, /* IANA */
802 { 202, "ISO646-FR1", 0, no }, /* IANA */
803 { 202, "csISO25French", 0, no }, /* IANA */
804 { 203, "iso-ir-60", 20108, no }, /* IANA */
805 { 203, "NS_4551-1", 20108, no }, /* IANA */
806 { 203, "ISO646-NO", 20108, no }, /* IANA */
807 { 203, "no", 20108, no }, /* IANA */
808 { 203, "csISO60DanishNorwegian", 20108, no }, /* IANA */
809 { 203, "csISO60Norwegian1", 20108, no }, /* IANA */
810 { 203, "x-ia5-norwegian", 20108, no }, /* MICROSOFT */
811 { 204, "iso-ir-61", 0, no }, /* IANA */
812 { 204, "NS_4551-2", 0, no }, /* IANA */
813 { 204, "ISO646-NO2", 0, no }, /* IANA */
814 { 204, "no2", 0, no }, /* IANA */
815 { 204, "csISO61Norwegian2", 0, no }, /* IANA */
816 { 205, "PC8-Danish-Norwegian", 0, no }, /* IANA */
817 { 205, "csPC8DanishNorwegian", 0, no }, /* IANA */
818 { 206, "PC8-Turkish", 0, no }, /* IANA */
819 { 206, "csPC8Turkish", 0, no }, /* IANA */
820 { 207, "iso-ir-16", 0, no }, /* IANA */
821 { 207, "PT", 0, no }, /* IANA */
822 { 207, "ISO646-PT", 0, no }, /* IANA */
823 { 207, "csISO16Portuguese", 0, no }, /* IANA */
824 { 208, "iso-ir-84", 0, no }, /* IANA */
825 { 208, "PT2", 0, no }, /* IANA */
826 { 208, "ISO646-PT2", 0, no }, /* IANA */
827 { 208, "csISO84Portuguese2", 0, no }, /* IANA */
828 { 209, "PTCP154", 0, no }, /* IANA */
829 { 209, "csPTCP154", 0, no }, /* IANA */
830 { 209, "PT154", 0, no }, /* IANA */
831 { 209, "CP154", 0, no }, /* IANA */
832 { 209, "Cyrillic-Asian", 0, no }, /* IANA */
833 { 210, "SCSU", 0, no }, /* IANA */
834 { 211, "iso-ir-10", 20107, no }, /* IANA */
835 { 211, "SEN_850200_B", 20107, no }, /* IANA */
836 { 211, "FI", 20107, no }, /* IANA */
837 { 211, "ISO646-FI", 20107, no }, /* IANA */
838 { 211, "ISO646-SE", 20107, no }, /* IANA */
839 { 211, "se", 20107, no }, /* IANA */
840 { 211, "csISO10Swedish", 20107, no }, /* IANA */
841 { 211, "x-ia5-swedish", 20107, no }, /* MICROSOFT */
842 { 212, "iso-ir-11", 0, no }, /* IANA */
843 { 212, "SEN_850200_C", 0, no }, /* IANA */
844 { 212, "ISO646-SE2", 0, no }, /* IANA */
845 { 212, "se2", 0, no }, /* IANA */
846 { 212, "csISO11SwedishForNames", 0, no }, /* IANA */
847 { 213, "Shift_JIS", 932, no }, /* IANA */
848 { 213, "MS_Kanji", 932, no }, /* IANA */
849 { 213, "csShiftJIS", 932, no }, /* IANA */
850 { 213, "shift-jis", 932, no }, /* MICROSOFT */
851 { 213, "x-ms-cp932", 932, no }, /* MICROSOFT */
852 { 213, "x-sjis", 932, no }, /* MICROSOFT */
853 { 213, "cp932", 932, no },
854 { 213, "sjis", 932, no },
855 { 214, "iso-ir-128", 0, no }, /* IANA */
856 { 214, "T.101-G2", 0, no }, /* IANA */
857 { 214, "csISO128T101G2", 0, no }, /* IANA */
858 { 215, "iso-ir-102", 0, no }, /* IANA */
859 { 215, "T.61-7bit", 0, no }, /* IANA */
860 { 215, "csISO102T617bit", 0, no }, /* IANA */
861 { 216, "iso-ir-103", 0, no }, /* IANA */
862 { 216, "T.61-8bit", 0, no }, /* IANA */
863 { 216, "T.61", 0, no }, /* IANA */
864 { 216, "csISO103T618bit", 0, no }, /* IANA */
865 { 217, "TIS-620", 874, no }, /* IANA */
866 { 217, "Windows-874", 874, no }, /* MICROSOFT */
867 { 217, "ISO-8859-11", 874, no }, /* MICROSOFT */
868 { 217, "dos-874", 874, no }, /* MICROSOFT */
869 { 218, "UNICODE-1-1", 0, no }, /* IANA */
870 { 218, "csUnicode11", 0, no }, /* IANA */
871 { 219, "UNICODE-1-1-UTF-7", 65000, yes }, /* IANA */
872 { 219, "csUnicode11UTF7", 65000, yes }, /* IANA */
873 { 219, "x-unicode-2-0-utf-7", 65000, yes }, /* MICROSOFT */
874 { 220, "UNKNOWN-8BIT", 0, no }, /* IANA */
875 { 220, "csUnknown8BiT", 0, no }, /* IANA */
876 { 221, "us-dk", 0, no }, /* IANA */
877 { 221, "csUSDK", 0, no }, /* IANA */
878 { 222, "UTF-16", 1200, no }, /* IANA */
879 { 222, "Unicode", 1200, no }, /* MICROSOFT */
880 { 223, "UTF-16BE", 1201, no }, /* IANA */
881 { 223, "UnicodeFFFE", 1201, no }, /* MICROSOFT */
882 { 224, "UTF-16LE", 1200, no }, /* IANA */
883 { 224, "Unicode", 1200, no }, /* MICROSOFT */
884 { 225, "UTF-32", 0, no }, /* IANA */
885 { 226, "UTF-32BE", 0, no }, /* IANA */
886 { 227, "UTF-32LE", 0, no }, /* IANA */
887 { 228, "UTF-7", 65000, yes }, /* IANA */
888 { 228, "x-unicode-2-0-utf-7", 65000, yes }, /* MICROSOFT */
889 { 229, "UTF-8", 65001, no }, /* IANA */
890 { 229, "unicode-2-0-utf-8", 65001, no }, /* MICROSOFT */
891 { 229, "unicode-1-1-utf-8", 65001, no }, /* MICROSOFT */
892 { 229, "x-unicode-2-0-utf-8", 65001, no }, /* MICROSOFT */
893 { 230, "Ventura-International", 0, no }, /* IANA */
894 { 230, "csVenturaInternational", 0, no }, /* IANA */
895 { 231, "Ventura-Math", 0, no }, /* IANA */
896 { 231, "csVenturaMath", 0, no }, /* IANA */
897 { 232, "Ventura-US", 0, no }, /* IANA */
898 { 232, "csVenturaUS", 0, no }, /* IANA */
899 { 233, "iso-ir-70", 0, no }, /* IANA */
900 { 233, "videotex-suppl", 0, no }, /* IANA */
901 { 233, "csISO70VideotexSupp1", 0, no }, /* IANA */
902 { 234, "VIQR", 0, no }, /* IANA */
903 { 234, "csVIQR", 0, no }, /* IANA */
904 { 235, "VISCII", 0, no }, /* IANA */
905 { 235, "csVISCII", 0, no }, /* IANA */
906 { 236, "Windows-1250", 1250, no }, /* IANA */
907 { 236, "x-cp1250", 1250, no }, /* MICROSOFT */
908 { 237, "Windows-1251", 1251, no }, /* IANA */
909 { 237, "x-cp1251", 1251, no }, /* MICROSOFT */
910 { 238, "Windows-1252", 1252, no }, /* IANA */
911 { 238, "x-ansi", 1252, no }, /* MICROSOFT */
912 { 239, "Windows-1253", 1253, no }, /* IANA */
913 { 240, "Windows-1254", 1254, no }, /* IANA */
914 { 241, "Windows-1255", 1255, no }, /* IANA */
915 { 242, "Windows-1256", 1256, no }, /* IANA */
916 { 242, "cp1256", 1256, no }, /* MICROSOFT */
917 { 243, "Windows-1257", 1257, no }, /* IANA */
918 { 244, "Windows-1258", 1258, no }, /* IANA */
919 { 245, "Windows-31J", 932, no }, /* IANA */
920 { 245, "csWindows31J", 932, no }, /* IANA */
921 { 245, "shift-jis", 932, no }, /* MICROSOFT */
922 { 245, "x-ms-cp932", 932, no }, /* MICROSOFT */
923 { 245, "x-sjis", 932, no }, /* MICROSOFT */
924 { 246, "dos-720", 720, no }, /* MICROSOFT */
925 { 247, "euc-cn", 51936, no }, /* MICROSOFT */
926 { 248, "ibm737", 737, no }, /* MICROSOFT */
927 { 249, "johab", 1361, no }, /* MICROSOFT */
928 { 250, "x-chinese-cns", 20000, no }, /* MICROSOFT */
929 { 251, "x-chinese-eten", 20002, no }, /* MICROSOFT */
930 { 252, "x-ebcdic-cyrillicserbianbulgarian", 21025, no }, /* MICROSOFT */
931 { 253, "x-ebcdic-greekmodern", 875, no }, /* MICROSOFT */
932 { 254, "x-ebcdic-japaneseandjapaneselatin", 50939, no }, /* MICROSOFT */
933 { 255, "x-ebcdic-japaneseandkana", 50930, no }, /* MICROSOFT */
934 { 256, "x-ebcdic-japaneseanduscanada", 50931, no }, /* MICROSOFT */
935 { 257, "x-ebcdic-koreanandkoreanextended", 50933, no }, /* MICROSOFT */
936 { 258, "x-ebcdic-koreanextended", 20833, no }, /* MICROSOFT */
937 { 259, "x-ebcdic-simplifiedchinese", 50935, no }, /* MICROSOFT */
938 { 260, "x-ebcdic-traditionalchinese", 50937, no }, /* MICROSOFT */
939 { 261, "x-euc-cn", 51936, no }, /* MICROSOFT */
940 { 262, "x-europa", 29001, no }, /* MICROSOFT */
941 { 263, "x-iscii-as", 57006, no }, /* MICROSOFT */
942 { 264, "x-iscii-be", 57003, no }, /* MICROSOFT */
943 { 265, "x-iscii-de", 57002, no }, /* MICROSOFT */
944 { 266, "x-iscii-gu", 57010, no }, /* MICROSOFT */
945 { 267, "x-iscii-ka", 57008, no }, /* MICROSOFT */
946 { 268, "x-iscii-ma", 57009, no }, /* MICROSOFT */
947 { 269, "x-iscii-or", 57007, no }, /* MICROSOFT */
948 { 270, "x-iscii-pa", 57011, no }, /* MICROSOFT */
949 { 271, "x-iscii-ta", 57004, no }, /* MICROSOFT */
950 { 272, "x-iscii-te", 57005, no }, /* MICROSOFT */
951 { 273, "x-mac-arabic", 10004, no }, /* MICROSOFT */
952 { 274, "x-mac-ce", 10029, no }, /* MICROSOFT */
953 { 275, "x-mac-chinesesimp", 10008, no }, /* MICROSOFT */
954 { 276, "x-mac-chinesetrad", 10002, no }, /* MICROSOFT */
955 { 277, "x-mac-cyrillic", 10007, no }, /* MICROSOFT */
956 { 278, "x-mac-greek", 10006, no }, /* MICROSOFT */
957 { 279, "x-mac-hebrew", 10005, no }, /* MICROSOFT */
958 { 280, "x-mac-icelandic", 10079, no }, /* MICROSOFT */
959 { 281, "x-mac-japanese", 10001, no }, /* MICROSOFT */
960 { 282, "x-mac-korean", 10003, no }, /* MICROSOFT */
961 { 283, "x-mac-turkish", 10081, no }, /* MICROSOFT */
962 { 284, "cp20932", 20932, no }, /* MICROSOFT */
963 { 285, "ASMO-708", 708, no }, /* IANA */
969 static struct _charsetInfo const **index1;
970 static struct _charsetInfo const **index2;
971 static struct _charsetInfo const **index3;
973 enum { numCharsetInfo = sizeof charsetInfo / sizeof *charsetInfo - 1 };
975 static int CompareByName(const void *elem1, const void *elem2)
977 const struct _charsetInfo *p = *(const struct _charsetInfo **)elem1;
978 const struct _charsetInfo *q = *(const struct _charsetInfo **)elem2;
979 return _stricmp(p->charset, q->charset);
982 static int CompareByCodePage(const void *elem1, const void *elem2)
984 const struct _charsetInfo *p = *(const struct _charsetInfo **)elem1;
985 const struct _charsetInfo *q = *(const struct _charsetInfo **)elem2;
986 return p->codepage - q->codepage;
989 static int SortCompareByCodePage(const void *elem1, const void *elem2)
991 const struct _charsetInfo *p = *(const struct _charsetInfo **)elem1;
992 const struct _charsetInfo *q = *(const struct _charsetInfo **)elem2;
993 return (int)(p->codepage != q->codepage ? p->codepage - q->codepage : p - q);
996 static struct _charsetInfo const *FindByName(const char *name)
998 struct _charsetInfo const *info = NULL;
1001 struct _charsetInfo const key = {0, name, 0, no};
1002 struct _charsetInfo const *pkey = &key;
1003 struct _charsetInfo const **pinfo = (struct _charsetInfo **)bsearch(&pkey, index1, numCharsetInfo, sizeof *index1, CompareByName);
1012 static struct _charsetInfo const *FindById(unsigned id)
1014 size_t numIndex = charsetInfo[numCharsetInfo - 1].id + 1;
1015 return index2 && id < numIndex ? index2[id] : NULL;
1018 static struct _charsetInfo const *FindByCodePage(unsigned codepage)
1020 struct _charsetInfo const *info = NULL;
1021 size_t numIndex = charsetInfo[numCharsetInfo - 1].id + 1;
1022 if (index3 && codepage)
1024 struct _charsetInfo const key = {0, 0, codepage, no};
1025 struct _charsetInfo const *pkey = &key;
1026 struct _charsetInfo const **pinfo = (struct _charsetInfo **)bsearch(&pkey, index3, numIndex, sizeof(void *), CompareByCodePage);
1027 if (pinfo != NULL) do
1030 } while (pinfo > index3 && CompareByCodePage(--pinfo, &pkey) == 0);
1035 void charsets_init(void)
1038 size_t numIndex = charsetInfo[numCharsetInfo - 1].id + 1;
1039 index1 = (struct _charsetInfo **)calloc(numCharsetInfo, sizeof(void *));
1040 index2 = (struct _charsetInfo **)calloc(numIndex, sizeof(void *));
1041 index3 = (struct _charsetInfo **)calloc(numIndex, sizeof(void *));
1042 if (!index1 || !index2 || !index3)
1044 for (i = numCharsetInfo ; i-- ; )
1046 index1[i] = charsetInfo + i;
1048 qsort((void*)index1, numCharsetInfo, sizeof(void *), CompareByName);
1049 for (i = numCharsetInfo ; i-- ; )
1051 index2[charsetInfo[i].id] = charsetInfo + i;
1053 for (i = numCharsetInfo + 1 ; i-- ; )
1055 index3[charsetInfo[i].id] = charsetInfo + i;
1057 qsort((void*)index3, numIndex, sizeof(void *), SortCompareByCodePage);
1060 void charsets_cleanup(void)
1064 free((void *)index1);
1069 free((void *)index2);
1074 free((void *)index3);
1080 unsigned GetEncodingIdFromName(const char *name)
1082 struct _charsetInfo const *info = FindByName(name);
1083 return info ? info->id : 0;
1086 unsigned GetEncodingIdFromCodePage(unsigned cp)
1088 struct _charsetInfo const *info = FindByCodePage(cp);
1089 return info ? info->id : 0;
1092 unsigned GetEncodingCodePageFromName(const char *name)
1094 struct _charsetInfo const *info = FindByName(name);
1095 return info ? info->codepage : 0;
1098 unsigned GetEncodingCodePageFromId(unsigned id)
1100 struct _charsetInfo const *info = FindById(id);
1101 return info ? info->codepage : 0;
1104 const char *GetEncodingNameFromId(unsigned id)
1106 struct _charsetInfo const *info = FindById(id);
1107 return info ? info->charset : NULL;
1110 const char *GetEncodingNameFromCodePage(unsigned cp)
1112 struct _charsetInfo const *info = FindByCodePage(cp);
1113 return info ? info->charset : NULL;