|
1 /* |
|
2 * Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. |
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
|
4 * |
|
5 * This code is free software; you can redistribute it and/or modify it |
|
6 * under the terms of the GNU General Public License version 2 only, as |
|
7 * published by the Free Software Foundation. |
|
8 * |
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
|
13 * accompanied this code). |
|
14 * |
|
15 * You should have received a copy of the GNU General Public License version |
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 * |
|
19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
|
20 * CA 95054 USA or visit www.sun.com if you need additional information or |
|
21 * have any questions. |
|
22 */ |
|
23 |
|
24 /* @test |
|
25 * @bug 4473201 4696726 4652234 4482298 4784385 4966197 4267354 5015668 |
|
26 * @summary Check that registered charsets are actually registered |
|
27 */ |
|
28 |
|
29 import java.io.*; |
|
30 import java.nio.*; |
|
31 import java.nio.charset.*; |
|
32 import java.util.*; |
|
33 |
|
34 public class RegisteredCharsets { |
|
35 |
|
36 static String [] ianaRegistered = { |
|
37 "US-ASCII", "UTF8", "Big5", "EUC-JP", |
|
38 "GBK", "GB18030", "ISO-2022-KR", "ISO-2022-JP", |
|
39 "GB2312", // IANA preferred name for "EUC-CN" |
|
40 "ISO-8859-1", "ISO-8859-2", "ISO-8859-3", |
|
41 "ISO-8859-4", "ISO-8859-5", "ISO-8859-6", |
|
42 "ISO-8859-7", "ISO-8859-8", "ISO-8859-9", |
|
43 "ISO-8859-13", "ISO-8859-15", "windows-1251", |
|
44 "windows-1252", "windows-1253", "windows-1254", |
|
45 "windows-1255", "windows-1256", "windows-31j", |
|
46 "Shift_JIS", "JIS_X0201", "JIS_X0212-1990", |
|
47 "TIS-620", "Big5-HKSCS", |
|
48 "ISO-2022-CN", |
|
49 "IBM850", |
|
50 "IBM852", |
|
51 "IBM855", |
|
52 "IBM857", |
|
53 "IBM860", |
|
54 "IBM861", |
|
55 "IBM862", |
|
56 "IBM863", |
|
57 "IBM864", |
|
58 "IBM865", |
|
59 "IBM866", |
|
60 "IBM868", |
|
61 "IBM869", |
|
62 "IBM437", |
|
63 "IBM775", |
|
64 "IBM037", |
|
65 "IBM1026", |
|
66 "IBM273", |
|
67 "IBM277", |
|
68 "IBM278", |
|
69 "IBM280", |
|
70 "IBM284", |
|
71 "IBM285", |
|
72 "IBM297", |
|
73 "IBM420", |
|
74 "IBM424", |
|
75 "IBM500", |
|
76 "IBM-Thai", |
|
77 "IBM870", |
|
78 "IBM871", |
|
79 "IBM918", |
|
80 "IBM1047", |
|
81 "IBM01140", |
|
82 "IBM01141", |
|
83 "IBM01142", |
|
84 "IBM01143", |
|
85 "IBM01144", |
|
86 "IBM01145", |
|
87 "IBM01146", |
|
88 "IBM01147", |
|
89 "IBM01148", |
|
90 "IBM01149", |
|
91 "IBM00858" }; |
|
92 |
|
93 static String [] ianaUnRegistered = { |
|
94 "x-EUC-TW", "x-ISCII91", |
|
95 "x-windows-949", "x-windows-950", |
|
96 "x-mswin-936", "x-JIS0208", |
|
97 "x-ISO-8859-11", |
|
98 "x-windows-874", |
|
99 "x-PCK", "x-JISAutoDetect", "x-Johab", |
|
100 "x-MS950-HKSCS", |
|
101 "x-Big5-Solaris", |
|
102 "x-ISO-2022-CN-CNS", |
|
103 "x-ISO-2022-CN-GB", |
|
104 "x-MacArabic", |
|
105 "x-MacCentralEurope", |
|
106 "x-MacCroatian", |
|
107 "x-MacCyrillic", |
|
108 "x-MacDingbat", |
|
109 "x-MacGreek", |
|
110 "x-MacHebrew", |
|
111 "x-MacIceland", |
|
112 "x-MacRoman", |
|
113 "x-MacRomania", |
|
114 "x-MacSymbol", |
|
115 "x-MacThai", |
|
116 "x-MacTurkish", |
|
117 "x-MacUkraine", |
|
118 "x-IBM942", |
|
119 "x-IBM942C", |
|
120 "x-IBM943", |
|
121 "x-IBM943C", |
|
122 "x-IBM948", |
|
123 "x-IBM950", |
|
124 "x-IBM930", |
|
125 "x-IBM935", |
|
126 "x-IBM937", |
|
127 "x-IBM856", |
|
128 "x-IBM874", |
|
129 "x-IBM737", |
|
130 "x-IBM1006", |
|
131 "x-IBM1046", |
|
132 "x-IBM1098", |
|
133 "x-IBM1025", |
|
134 "x-IBM1112", |
|
135 "x-IBM1122", |
|
136 "x-IBM1123", |
|
137 "x-IBM1124", |
|
138 "x-IBM875", |
|
139 "x-IBM921", |
|
140 "x-IBM922", |
|
141 "x-IBM1097", |
|
142 "x-IBM949", |
|
143 "x-IBM949C", |
|
144 "x-IBM939", |
|
145 "x-IBM933", |
|
146 "x-IBM1381", |
|
147 "x-IBM1383", |
|
148 "x-IBM970", |
|
149 "x-IBM964", |
|
150 "x-IBM33722", |
|
151 "x-IBM1006", |
|
152 "x-IBM1046", |
|
153 "x-IBM1097", |
|
154 "x-IBM1098", |
|
155 "x-IBM1112", |
|
156 "x-IBM1122", |
|
157 "x-IBM1123", |
|
158 "x-IBM1124", |
|
159 "x-IBM33722", |
|
160 "x-IBM737", |
|
161 "x-IBM856", |
|
162 "x-IBM874", |
|
163 "x-IBM875", |
|
164 "x-IBM922", |
|
165 "x-IBM933", |
|
166 "x-IBM964" }; |
|
167 |
|
168 static void check(String csn, boolean testRegistered) throws Exception { |
|
169 if (!Charset.forName(csn).isRegistered() && testRegistered) |
|
170 throw new Exception("Not registered: " + csn); |
|
171 else if (Charset.forName(csn).isRegistered() && !testRegistered) |
|
172 throw new Exception("Registered: " + csn + "should be unregistered"); |
|
173 } |
|
174 |
|
175 static void aliasCheck(String canonicalName, String[] aliasNames) throws Exception |
|
176 { |
|
177 for (int k = 0; k < aliasNames.length; k++ ) { |
|
178 Charset cs = Charset.forName(aliasNames[k]); |
|
179 if (!cs.name().equals(canonicalName)) { |
|
180 throw new Exception("Unexpected Canonical name " + canonicalName); |
|
181 } |
|
182 } |
|
183 } |
|
184 |
|
185 public static void main(String[] args) throws Exception { |
|
186 |
|
187 for (int i = 0; i < ianaRegistered.length ; i++) |
|
188 check(ianaRegistered[i], true); |
|
189 |
|
190 for (int i = 0; i < ianaUnRegistered.length ; i++) |
|
191 check(ianaUnRegistered[i], false); |
|
192 |
|
193 // Check aliases registered with IANA for all NIO supported |
|
194 // Charset implementations. |
|
195 // |
|
196 // The aliases below are in sync with the IANA registered charset |
|
197 // document at: http://www.iana.org/assignments/character-sets |
|
198 // Last updated 7/25/2002 |
|
199 |
|
200 aliasCheck("US-ASCII", |
|
201 new String[] {"ascii","ANSI_X3.4-1968", |
|
202 "iso-ir-6","ANSI_X3.4-1986", "ISO_646.irv:1991", |
|
203 "ASCII", "ISO646-US","us","IBM367","cp367", |
|
204 "csASCII", "default"}); |
|
205 |
|
206 aliasCheck("UTF-8", |
|
207 new String[] { |
|
208 "UTF8", |
|
209 "unicode-1-1-utf-8" |
|
210 }); |
|
211 |
|
212 aliasCheck("UTF-16", |
|
213 new String[] { |
|
214 "UTF_16", |
|
215 "utf16" |
|
216 }); |
|
217 |
|
218 aliasCheck("UTF-16BE", |
|
219 new String[] { |
|
220 "UTF_16BE", |
|
221 "ISO-10646-UCS-2", |
|
222 "X-UTF-16BE", |
|
223 "UnicodeBigUnmarked" |
|
224 }); |
|
225 |
|
226 aliasCheck("UTF-16LE", |
|
227 new String[] { |
|
228 "UTF_16LE", |
|
229 "X-UTF-16LE", |
|
230 "UnicodeLittleUnmarked" |
|
231 }); |
|
232 |
|
233 aliasCheck("Big5", |
|
234 new String[] { |
|
235 "csBig5" |
|
236 }); |
|
237 |
|
238 aliasCheck("Big5-HKSCS", |
|
239 new String[] { |
|
240 "Big5_HKSCS", |
|
241 "big5hk", |
|
242 "big5-hkscs", |
|
243 "big5-hkscs:unicode3.0", |
|
244 "big5hkscs" |
|
245 }); |
|
246 |
|
247 aliasCheck("x-MS950-HKSCS", |
|
248 new String[] { |
|
249 "MS950_HKSCS" |
|
250 }); |
|
251 |
|
252 aliasCheck("GB18030", |
|
253 new String[] { |
|
254 "gb18030-2000" |
|
255 }); |
|
256 |
|
257 aliasCheck("ISO-2022-KR", new String[] {"csISO2022KR"}); |
|
258 aliasCheck("ISO-2022-JP", new String[] {"csISO2022JP"}); |
|
259 aliasCheck("EUC-KR", new String[] { "csEUCKR"}); |
|
260 aliasCheck("ISO-8859-1", |
|
261 new String[] { |
|
262 |
|
263 // IANA aliases |
|
264 "iso-ir-100", |
|
265 "ISO_8859-1", |
|
266 "latin1", |
|
267 "l1", |
|
268 "IBM819", |
|
269 "cp819", |
|
270 "csISOLatin1", |
|
271 |
|
272 // JDK historical aliases |
|
273 "819", |
|
274 "IBM-819", |
|
275 "ISO8859_1", |
|
276 "ISO_8859-1:1987", |
|
277 "ISO_8859_1", |
|
278 "8859_1", |
|
279 "ISO8859-1", |
|
280 |
|
281 }); |
|
282 |
|
283 aliasCheck("ISO-8859-2", |
|
284 new String[] { |
|
285 "ISO_8859-2", |
|
286 "ISO_8859-2:1987", |
|
287 "iso-ir-101", |
|
288 "latin2", |
|
289 "l2", |
|
290 "8859_2", |
|
291 "iso_8859-2:1987", |
|
292 "iso8859-2", |
|
293 "ibm912", |
|
294 "ibm-912", |
|
295 "cp912", |
|
296 "912", |
|
297 "csISOLatin2"}); |
|
298 |
|
299 aliasCheck("ISO-8859-3", |
|
300 new String[] {"latin3", |
|
301 "ISO_8859-3:1988", |
|
302 "iso-ir-109", |
|
303 "l3", |
|
304 "8859_3", |
|
305 "iso_8859-3:1988", |
|
306 "iso8859-3", |
|
307 "ibm913", |
|
308 "ibm-913", |
|
309 "cp913", |
|
310 "913", |
|
311 "csISOLatin3"}); |
|
312 |
|
313 aliasCheck("ISO-8859-4", |
|
314 new String[] {"csISOLatin4", |
|
315 "ISO_8859-4:1988", |
|
316 "iso-ir-110", |
|
317 "latin4", |
|
318 "8859_4", |
|
319 "iso_8859-4:1988", |
|
320 "iso8859-4", |
|
321 "ibm914", |
|
322 "ibm-914", |
|
323 "cp914", |
|
324 "914", |
|
325 "l4"}); |
|
326 |
|
327 aliasCheck("ISO-8859-5", |
|
328 new String[] { |
|
329 "iso8859_5", // JDK historical |
|
330 "8859_5", |
|
331 "iso-ir-144", |
|
332 "ISO_8859-5", |
|
333 "ISO_8859-5:1988", |
|
334 "ISO8859-5", |
|
335 "cyrillic", |
|
336 "ibm915", |
|
337 "ibm-915", |
|
338 "915", |
|
339 "cp915", |
|
340 "csISOLatinCyrillic" |
|
341 }); |
|
342 |
|
343 aliasCheck("ISO-8859-6", |
|
344 new String[] {"ISO_8859-6:1987", |
|
345 "iso-ir-127", |
|
346 "ISO_8859-6", |
|
347 "ECMA-114", |
|
348 "ASMO-708", |
|
349 "arabic", |
|
350 "8859_6", |
|
351 "iso_8859-6:1987", |
|
352 "iso8859-6", |
|
353 "ibm1089", |
|
354 "ibm-1089", |
|
355 "cp1089", |
|
356 "1089", |
|
357 "csISOLatinArabic"}); |
|
358 |
|
359 aliasCheck("ISO-8859-7", |
|
360 new String[] {"ISO_8859-7:1987", |
|
361 "iso-ir-126", |
|
362 "ISO_8859-7", |
|
363 "ELOT_928", |
|
364 "ECMA-118", |
|
365 "greek", |
|
366 "greek8", |
|
367 "8859_7", |
|
368 "iso_8859-7:1987", |
|
369 "iso8859-7", |
|
370 "ibm813", |
|
371 "ibm-813", |
|
372 "cp813", |
|
373 "813", |
|
374 "csISOLatinGreek"}); |
|
375 |
|
376 aliasCheck("ISO-8859-8", |
|
377 new String[] { |
|
378 "ISO_8859-8:1988", |
|
379 "iso-ir-138", |
|
380 "ISO_8859-8", |
|
381 "hebrew", |
|
382 "8859_8", |
|
383 "iso_8859-8:1988", |
|
384 "iso8859-8", |
|
385 "ibm916", |
|
386 "ibm-916", |
|
387 "cp916", |
|
388 "916", |
|
389 "csISOLatinHebrew"}); |
|
390 |
|
391 aliasCheck("ISO-8859-9", |
|
392 new String[] {"ISO_8859-9:1989", |
|
393 "iso-ir-148", |
|
394 "ISO_8859-9", |
|
395 "latin5", |
|
396 "l5", |
|
397 "8859_9", |
|
398 "iso8859-9", |
|
399 "ibm920", |
|
400 "ibm-920", |
|
401 "cp920", |
|
402 "920", |
|
403 "csISOLatin5"}); |
|
404 |
|
405 aliasCheck("ISO-8859-13", |
|
406 new String[] { |
|
407 "iso8859_13", // JDK historical |
|
408 "iso_8859-13", |
|
409 "8859_13", |
|
410 "ISO8859-13" |
|
411 }); |
|
412 |
|
413 aliasCheck("ISO-8859-15", |
|
414 new String[] { |
|
415 // IANA alias |
|
416 "ISO_8859-15", |
|
417 // JDK historical aliases |
|
418 "8859_15", |
|
419 "ISO-8859-15", |
|
420 "ISO_8859-15", |
|
421 "ISO8859-15", |
|
422 "ISO8859_15", |
|
423 "IBM923", |
|
424 "IBM-923", |
|
425 "cp923", |
|
426 "923", |
|
427 "LATIN0", |
|
428 "LATIN9", |
|
429 "L9", |
|
430 "csISOlatin0", |
|
431 "csISOlatin9", |
|
432 "ISO8859_15_FDIS" |
|
433 |
|
434 }); |
|
435 |
|
436 aliasCheck("JIS_X0212-1990", |
|
437 new String[] { |
|
438 "iso-ir-159", |
|
439 "csISO159JISX02121990"}); |
|
440 |
|
441 aliasCheck("JIS_X0201", |
|
442 new String[]{ |
|
443 "X0201", |
|
444 "csHalfWidthKatakana"}); |
|
445 |
|
446 aliasCheck("KOI8-R", |
|
447 new String[] { |
|
448 "KOI8_R", |
|
449 "csKOI8R"}); |
|
450 |
|
451 aliasCheck("GBK", |
|
452 new String[] { |
|
453 "windows-936"}); |
|
454 |
|
455 aliasCheck("Shift_JIS", |
|
456 new String[] { |
|
457 "MS_Kanji", |
|
458 "csShiftJIS"}); |
|
459 |
|
460 aliasCheck("EUC-JP", |
|
461 new String[] { |
|
462 "Extended_UNIX_Code_Packed_Format_for_Japanese", |
|
463 "csEUCPkdFmtJapanese"}); |
|
464 |
|
465 aliasCheck("Big5", new String[] {"csBig5"}); |
|
466 |
|
467 aliasCheck("windows-31j", new String[] {"csWindows31J"}); |
|
468 |
|
469 aliasCheck("x-iso-8859-11", |
|
470 new String[] { "iso-8859-11", "iso8859_11" }); |
|
471 |
|
472 aliasCheck("windows-1250", |
|
473 new String[] { |
|
474 "cp1250", |
|
475 "cp5346" |
|
476 }); |
|
477 |
|
478 aliasCheck("windows-1251", |
|
479 new String[] { |
|
480 "cp1251", |
|
481 "cp5347", |
|
482 "ansi-1251" |
|
483 }); |
|
484 |
|
485 aliasCheck("windows-1252", |
|
486 new String[] { |
|
487 "cp1252", |
|
488 "cp5348" |
|
489 }); |
|
490 |
|
491 aliasCheck("windows-1253", |
|
492 new String[] { |
|
493 "cp1253", |
|
494 "cp5349" |
|
495 }); |
|
496 |
|
497 aliasCheck("windows-1254", |
|
498 new String[] { |
|
499 "cp1254", |
|
500 "cp5350" |
|
501 }); |
|
502 |
|
503 aliasCheck("windows-1255", |
|
504 new String[] { |
|
505 "cp1255" |
|
506 }); |
|
507 |
|
508 aliasCheck("windows-1256", |
|
509 new String[] { |
|
510 "cp1256" |
|
511 }); |
|
512 |
|
513 aliasCheck("windows-1257", |
|
514 new String[] { |
|
515 "cp1257", |
|
516 "cp5353" |
|
517 }); |
|
518 |
|
519 aliasCheck("windows-1258", |
|
520 new String[] { |
|
521 "cp1258" |
|
522 }); |
|
523 |
|
524 aliasCheck("x-windows-874", |
|
525 new String[] { |
|
526 "ms874", "ms-874", "windows-874" }); |
|
527 |
|
528 aliasCheck("GB2312", |
|
529 new String[] { |
|
530 "x-EUC-CN", |
|
531 "gb2312-80", |
|
532 "gb2312-1980", |
|
533 "euc-cn", |
|
534 "euccn" }); |
|
535 |
|
536 aliasCheck("x-IBM942" , |
|
537 new String[] { |
|
538 "cp942", // JDK historical |
|
539 "ibm942", |
|
540 "ibm-942", |
|
541 "942" |
|
542 }); |
|
543 |
|
544 aliasCheck("x-IBM942C" , |
|
545 new String[] { |
|
546 "cp942C", // JDK historical |
|
547 "ibm942C", |
|
548 "ibm-942C", |
|
549 "942C" |
|
550 } ); |
|
551 |
|
552 aliasCheck("x-IBM943" , |
|
553 new String[] { |
|
554 "cp943", // JDK historical |
|
555 "ibm943", |
|
556 "ibm-943", |
|
557 "943" |
|
558 } ); |
|
559 |
|
560 aliasCheck("x-IBM943C" , |
|
561 new String[] { |
|
562 "cp943c", // JDK historical |
|
563 "ibm943C", |
|
564 "ibm-943C", |
|
565 "943C" |
|
566 } ); |
|
567 |
|
568 aliasCheck("x-IBM948" , |
|
569 new String[] { |
|
570 "cp948", // JDK historical |
|
571 "ibm948", |
|
572 "ibm-948", |
|
573 "948" |
|
574 } ); |
|
575 |
|
576 aliasCheck("x-IBM950" , |
|
577 new String[] { |
|
578 "cp950", // JDK historical |
|
579 "ibm950", |
|
580 "ibm-950", |
|
581 "950" |
|
582 } ); |
|
583 |
|
584 aliasCheck("x-IBM930" , |
|
585 new String[] { |
|
586 "cp930", // JDK historical |
|
587 "ibm930", |
|
588 "ibm-930", |
|
589 "930" |
|
590 } ); |
|
591 |
|
592 aliasCheck("x-IBM935" , |
|
593 new String[] { |
|
594 "cp935", // JDK historical |
|
595 "ibm935", |
|
596 "ibm-935", |
|
597 "935" |
|
598 } ); |
|
599 |
|
600 aliasCheck("x-IBM937" , |
|
601 new String[] { |
|
602 "cp937", // JDK historical |
|
603 "ibm937", |
|
604 "ibm-937", |
|
605 "937" |
|
606 } ); |
|
607 |
|
608 aliasCheck("IBM850" , |
|
609 new String[] { |
|
610 "cp850", // JDK historical |
|
611 "ibm-850", |
|
612 "ibm850", |
|
613 "850", |
|
614 "cspc850multilingual" |
|
615 } ); |
|
616 |
|
617 aliasCheck("IBM852" , |
|
618 new String[] { |
|
619 "cp852", // JDK historical |
|
620 "ibm852", |
|
621 "ibm-852", |
|
622 "852", |
|
623 "csPCp852" |
|
624 } ); |
|
625 |
|
626 aliasCheck("IBM855" , |
|
627 new String[] { |
|
628 "cp855", // JDK historical |
|
629 "ibm-855", |
|
630 "ibm855", |
|
631 "855", |
|
632 "cspcp855" |
|
633 } ); |
|
634 |
|
635 aliasCheck("x-IBM856" , |
|
636 new String[] { |
|
637 "cp856", // JDK historical |
|
638 "ibm-856", |
|
639 "ibm856", |
|
640 "856" |
|
641 } ); |
|
642 |
|
643 aliasCheck("IBM857" , |
|
644 new String[] { |
|
645 "cp857", // JDK historical |
|
646 "ibm857", |
|
647 "ibm-857", |
|
648 "857", |
|
649 "csIBM857" |
|
650 } ); |
|
651 |
|
652 aliasCheck("IBM860" , |
|
653 new String[] { |
|
654 "cp860", // JDK historical |
|
655 "ibm860", |
|
656 "ibm-860", |
|
657 "860", |
|
658 "csIBM860" |
|
659 } ); |
|
660 aliasCheck("IBM861" , |
|
661 new String[] { |
|
662 "cp861", // JDK historical |
|
663 "ibm861", |
|
664 "ibm-861", |
|
665 "861", |
|
666 "csIBM861" |
|
667 } ); |
|
668 |
|
669 aliasCheck("IBM862" , |
|
670 new String[] { |
|
671 "cp862", // JDK historical |
|
672 "ibm862", |
|
673 "ibm-862", |
|
674 "862", |
|
675 "csIBM862" |
|
676 } ); |
|
677 |
|
678 aliasCheck("IBM863" , |
|
679 new String[] { |
|
680 "cp863", // JDK historical |
|
681 "ibm863", |
|
682 "ibm-863", |
|
683 "863", |
|
684 "csIBM863" |
|
685 } ); |
|
686 |
|
687 aliasCheck("IBM864" , |
|
688 new String[] { |
|
689 "cp864", // JDK historical |
|
690 "ibm864", |
|
691 "ibm-864", |
|
692 "864", |
|
693 "csIBM864" |
|
694 } ); |
|
695 |
|
696 aliasCheck("IBM865" , |
|
697 new String[] { |
|
698 "cp865", // JDK historical |
|
699 "ibm865", |
|
700 "ibm-865", |
|
701 "865", |
|
702 "csIBM865" |
|
703 } ); |
|
704 |
|
705 aliasCheck("IBM866" , new String[] { |
|
706 "cp866", // JDK historical |
|
707 "ibm866", |
|
708 "ibm-866", |
|
709 "866", |
|
710 "csIBM866" |
|
711 } ); |
|
712 aliasCheck("IBM868" , |
|
713 new String[] { |
|
714 "cp868", // JDK historical |
|
715 "ibm868", |
|
716 "ibm-868", |
|
717 "868", |
|
718 "cp-ar", |
|
719 "csIBM868" |
|
720 } ); |
|
721 |
|
722 aliasCheck("IBM869" , |
|
723 new String[] { |
|
724 "cp869", // JDK historical |
|
725 "ibm869", |
|
726 "ibm-869", |
|
727 "869", |
|
728 "cp-gr", |
|
729 "csIBM869" |
|
730 } ); |
|
731 |
|
732 aliasCheck("IBM437" , |
|
733 new String[] { |
|
734 "cp437", // JDK historical |
|
735 "ibm437", |
|
736 "ibm-437", |
|
737 "437", |
|
738 "cspc8codepage437", |
|
739 "windows-437" |
|
740 } ); |
|
741 |
|
742 aliasCheck("x-IBM874" , |
|
743 new String[] { |
|
744 "cp874", // JDK historical |
|
745 "ibm874", |
|
746 "ibm-874", |
|
747 "874" |
|
748 } ); |
|
749 aliasCheck("x-IBM737" , |
|
750 new String[] { |
|
751 "cp737", // JDK historical |
|
752 "ibm737", |
|
753 "ibm-737", |
|
754 "737" |
|
755 } ); |
|
756 |
|
757 aliasCheck("IBM775" , |
|
758 new String[] { |
|
759 "cp775", // JDK historical |
|
760 "ibm775", |
|
761 "ibm-775", |
|
762 "775" |
|
763 } ); |
|
764 |
|
765 aliasCheck("x-IBM921" , |
|
766 new String[] { |
|
767 "cp921", // JDK historical |
|
768 "ibm921", |
|
769 "ibm-921", |
|
770 "921" |
|
771 } ); |
|
772 |
|
773 aliasCheck("x-IBM1006" , |
|
774 new String[] { |
|
775 "cp1006", // JDK historical |
|
776 "ibm1006", |
|
777 "ibm-1006", |
|
778 "1006" |
|
779 } ); |
|
780 |
|
781 aliasCheck("x-IBM1046" , |
|
782 new String[] { |
|
783 "cp1046", // JDK historical |
|
784 "ibm1046", |
|
785 "ibm-1046", |
|
786 "1046" |
|
787 } ); |
|
788 |
|
789 aliasCheck("IBM1047" , |
|
790 new String[] { |
|
791 "cp1047", // JDK historical |
|
792 "ibm-1047", |
|
793 "1047" |
|
794 } ); |
|
795 |
|
796 aliasCheck("x-IBM1098" , |
|
797 new String[] { |
|
798 "cp1098", // JDK historical |
|
799 "ibm1098", |
|
800 "ibm-1098", |
|
801 "1098", |
|
802 } ); |
|
803 |
|
804 aliasCheck("IBM037" , |
|
805 new String[] { |
|
806 "cp037", // JDK historical |
|
807 "ibm037", |
|
808 "csIBM037", |
|
809 "cs-ebcdic-cp-us", |
|
810 "cs-ebcdic-cp-ca", |
|
811 "cs-ebcdic-cp-wt", |
|
812 "cs-ebcdic-cp-nl", |
|
813 "ibm-037", |
|
814 "ibm-37", |
|
815 "cpibm37", |
|
816 "037" |
|
817 } ); |
|
818 |
|
819 aliasCheck("x-IBM1025" , |
|
820 new String[] { |
|
821 "cp1025", // JDK historical |
|
822 "ibm1025", |
|
823 "ibm-1025", |
|
824 "1025" |
|
825 } ); |
|
826 |
|
827 aliasCheck("IBM1026" , |
|
828 new String[] { |
|
829 "cp1026", // JDK historical |
|
830 "ibm1026", |
|
831 "ibm-1026", |
|
832 "1026" |
|
833 } ); |
|
834 |
|
835 aliasCheck("x-IBM1112" , |
|
836 new String[] { |
|
837 "cp1112", // JDK historical |
|
838 "ibm1112", |
|
839 "ibm-1112", |
|
840 "1112" |
|
841 } ); |
|
842 |
|
843 aliasCheck("x-IBM1122" , |
|
844 new String[] { |
|
845 "cp1122", // JDK historical |
|
846 "ibm1122", |
|
847 "ibm-1122", |
|
848 "1122" |
|
849 } ); |
|
850 |
|
851 aliasCheck("x-IBM1123" , |
|
852 new String[] { |
|
853 "cp1123", // JDK historical |
|
854 "ibm1123", |
|
855 "ibm-1123", |
|
856 "1123" |
|
857 } ); |
|
858 |
|
859 aliasCheck("x-IBM1124" , |
|
860 new String[] { |
|
861 "cp1124", // JDK historical |
|
862 "ibm1124", |
|
863 "ibm-1124", |
|
864 "1124" |
|
865 } ); |
|
866 |
|
867 aliasCheck("IBM273" , |
|
868 new String[] { |
|
869 "cp273", // JDK historical |
|
870 "ibm273", |
|
871 "ibm-273", |
|
872 "273" |
|
873 } ); |
|
874 |
|
875 aliasCheck("IBM277" , |
|
876 new String[] { |
|
877 "cp277", // JDK historical |
|
878 "ibm277", |
|
879 "ibm-277", |
|
880 "277" |
|
881 } ); |
|
882 |
|
883 aliasCheck("IBM278" , |
|
884 new String[] { |
|
885 "cp278", // JDK historical |
|
886 "ibm278", |
|
887 "ibm-278", |
|
888 "278", |
|
889 "ebcdic-sv", |
|
890 "ebcdic-cp-se", |
|
891 "csIBM278" |
|
892 } ); |
|
893 |
|
894 aliasCheck("IBM280" , |
|
895 new String[] { |
|
896 "cp280", // JDK historical |
|
897 "ibm280", |
|
898 "ibm-280", |
|
899 "280" |
|
900 } ); |
|
901 |
|
902 aliasCheck("IBM284" , |
|
903 new String[] { |
|
904 "cp284", // JDK historical |
|
905 "ibm284", |
|
906 "ibm-284", |
|
907 "284", |
|
908 "csIBM284", |
|
909 "cpibm284" |
|
910 } ); |
|
911 |
|
912 aliasCheck("IBM285" , |
|
913 new String[] { |
|
914 "cp285", // JDK historical |
|
915 "ibm285", |
|
916 "ibm-285", |
|
917 "285", |
|
918 "ebcdic-cp-gb", |
|
919 "ebcdic-gb", |
|
920 "csIBM285", |
|
921 "cpibm285" |
|
922 } ); |
|
923 |
|
924 aliasCheck("IBM297" , |
|
925 new String[] { |
|
926 "cp297", // JDK historical |
|
927 "ibm297", |
|
928 "ibm-297", |
|
929 "297", |
|
930 "ebcdic-cp-fr", |
|
931 "cpibm297", |
|
932 "csIBM297", |
|
933 } ); |
|
934 |
|
935 aliasCheck("IBM420" , |
|
936 new String[] { |
|
937 "cp420", // JDK historical |
|
938 "ibm420", |
|
939 "ibm-420", |
|
940 "ebcdic-cp-ar1", |
|
941 "420", |
|
942 "csIBM420" |
|
943 } ); |
|
944 |
|
945 aliasCheck("IBM424" , |
|
946 new String[] { |
|
947 "cp424", // JDK historical |
|
948 "ibm424", |
|
949 "ibm-424", |
|
950 "424", |
|
951 "ebcdic-cp-he", |
|
952 "csIBM424" |
|
953 } ); |
|
954 |
|
955 aliasCheck("IBM500" , |
|
956 new String[] { |
|
957 "cp500", // JDK historical |
|
958 "ibm500", |
|
959 "ibm-500", |
|
960 "500", |
|
961 "ebcdic-cp-ch", |
|
962 "ebcdic-cp-bh", |
|
963 "csIBM500" |
|
964 } ); |
|
965 |
|
966 aliasCheck("IBM-Thai" , |
|
967 new String[] { |
|
968 "cp838", // JDK historical |
|
969 "ibm838", |
|
970 "ibm-838", |
|
971 "ibm838", |
|
972 "838" |
|
973 } ); |
|
974 |
|
975 aliasCheck("IBM870" , |
|
976 new String[] { |
|
977 "cp870", // JDK historical |
|
978 "ibm870", |
|
979 "ibm-870", |
|
980 "870", |
|
981 "ebcdic-cp-roece", |
|
982 "ebcdic-cp-yu", |
|
983 "csIBM870" |
|
984 } ); |
|
985 |
|
986 aliasCheck("IBM871" , |
|
987 new String[] { |
|
988 "cp871", // JDK historical |
|
989 "ibm871", |
|
990 "ibm-871", |
|
991 "871", |
|
992 "ebcdic-cp-is", |
|
993 "csIBM871" |
|
994 } ); |
|
995 |
|
996 aliasCheck("x-IBM875" , |
|
997 new String[] { |
|
998 "cp875", // JDK historical |
|
999 "ibm875", |
|
1000 "ibm-875", |
|
1001 "875" |
|
1002 } ); |
|
1003 |
|
1004 aliasCheck("IBM918" , |
|
1005 new String[] { |
|
1006 "cp918", // JDK historical |
|
1007 "ibm-918", |
|
1008 "918", |
|
1009 "ebcdic-cp-ar2" |
|
1010 } ); |
|
1011 |
|
1012 aliasCheck("x-IBM922" , |
|
1013 new String[] { |
|
1014 "cp922", // JDK historical |
|
1015 "ibm922", |
|
1016 "ibm-922", |
|
1017 "922" |
|
1018 } ); |
|
1019 |
|
1020 aliasCheck("x-IBM1097" , |
|
1021 new String[] { |
|
1022 "cp1097", // JDK historical |
|
1023 "ibm1097", |
|
1024 "ibm-1097", |
|
1025 "1097" |
|
1026 } ); |
|
1027 |
|
1028 aliasCheck("x-IBM949" , |
|
1029 new String[] { |
|
1030 "cp949", // JDK historical |
|
1031 "ibm949", |
|
1032 "ibm-949", |
|
1033 "949" |
|
1034 } ); |
|
1035 |
|
1036 aliasCheck("x-IBM949C" , |
|
1037 new String[] { |
|
1038 "cp949C", // JDK historical |
|
1039 "ibm949C", |
|
1040 "ibm-949C", |
|
1041 "949C" |
|
1042 } ); |
|
1043 |
|
1044 aliasCheck("x-IBM939" , |
|
1045 new String[] { |
|
1046 "cp939", // JDK historical |
|
1047 "ibm939", |
|
1048 "ibm-939", |
|
1049 "939" |
|
1050 } ); |
|
1051 |
|
1052 aliasCheck("x-IBM933" , |
|
1053 new String[] { |
|
1054 "cp933", // JDK historical |
|
1055 "ibm933", |
|
1056 "ibm-933", |
|
1057 "933" |
|
1058 } ); |
|
1059 |
|
1060 aliasCheck("x-IBM1381" , |
|
1061 new String[] { |
|
1062 "cp1381", // JDK historical |
|
1063 "ibm1381", |
|
1064 "ibm-1381", |
|
1065 "1381" |
|
1066 } ); |
|
1067 |
|
1068 aliasCheck("x-IBM1383" , |
|
1069 new String[] { |
|
1070 "cp1383", // JDK historical |
|
1071 "ibm1383", |
|
1072 "ibm-1383", |
|
1073 "1383" |
|
1074 } ); |
|
1075 |
|
1076 aliasCheck("x-IBM970" , |
|
1077 new String[] { |
|
1078 "cp970", // JDK historical |
|
1079 "ibm970", |
|
1080 "ibm-970", |
|
1081 "ibm-eucKR", |
|
1082 "970" |
|
1083 } ); |
|
1084 |
|
1085 aliasCheck("x-IBM964" , |
|
1086 new String[] { |
|
1087 "cp964", // JDK historical |
|
1088 "ibm964", |
|
1089 "ibm-964", |
|
1090 "964" |
|
1091 } ); |
|
1092 |
|
1093 aliasCheck("x-IBM33722" , |
|
1094 new String[] { |
|
1095 "cp33722", // JDK historical |
|
1096 "ibm33722", |
|
1097 "ibm-33722", |
|
1098 "ibm-5050", // from IBM alias list |
|
1099 "ibm-33722_vascii_vpua", // from IBM alias list |
|
1100 "33722" |
|
1101 } ); |
|
1102 |
|
1103 aliasCheck("IBM01140" , |
|
1104 new String[] { |
|
1105 "cp1140", // JDK historical |
|
1106 "ccsid01140", |
|
1107 "cp01140", |
|
1108 // "ebcdic-us-037+euro" |
|
1109 } ); |
|
1110 |
|
1111 aliasCheck("IBM01141" , |
|
1112 new String[] { |
|
1113 "cp1141", // JDK historical |
|
1114 "ccsid01141", |
|
1115 "cp01141", |
|
1116 // "ebcdic-de-273+euro" |
|
1117 } ); |
|
1118 |
|
1119 aliasCheck("IBM01142" , |
|
1120 new String[] { |
|
1121 "cp1142", // JDK historical |
|
1122 "ccsid01142", |
|
1123 "cp01142", |
|
1124 // "ebcdic-no-277+euro", |
|
1125 // "ebcdic-dk-277+euro" |
|
1126 } ); |
|
1127 |
|
1128 aliasCheck("IBM01143" , |
|
1129 new String[] { |
|
1130 "cp1143", // JDK historical |
|
1131 "ccsid01143", |
|
1132 "cp01143", |
|
1133 // "ebcdic-fi-278+euro", |
|
1134 // "ebcdic-se-278+euro" |
|
1135 } ); |
|
1136 |
|
1137 aliasCheck("IBM01144" , |
|
1138 new String[] { |
|
1139 "cp1144", // JDK historical |
|
1140 "ccsid01144", |
|
1141 "cp01144", |
|
1142 // "ebcdic-it-280+euro" |
|
1143 } ); |
|
1144 |
|
1145 aliasCheck("IBM01145" , |
|
1146 new String[] { |
|
1147 "cp1145", // JDK historical |
|
1148 "ccsid01145", |
|
1149 "cp01145", |
|
1150 // "ebcdic-es-284+euro" |
|
1151 } ); |
|
1152 |
|
1153 aliasCheck("IBM01146" , |
|
1154 new String[] { |
|
1155 "cp1146", // JDK historical |
|
1156 "ccsid01146", |
|
1157 "cp01146", |
|
1158 // "ebcdic-gb-285+euro" |
|
1159 } ); |
|
1160 |
|
1161 aliasCheck("IBM01147" , |
|
1162 new String[] { |
|
1163 "cp1147", // JDK historical |
|
1164 "ccsid01147", |
|
1165 "cp01147", |
|
1166 // "ebcdic-fr-277+euro" |
|
1167 } ); |
|
1168 |
|
1169 aliasCheck("IBM01148" , |
|
1170 new String[] { |
|
1171 "cp1148", // JDK historical |
|
1172 "ccsid01148", |
|
1173 "cp01148", |
|
1174 // "ebcdic-international-500+euro" |
|
1175 } ); |
|
1176 |
|
1177 aliasCheck("IBM01149" , |
|
1178 new String[] { |
|
1179 "cp1149", // JDK historical |
|
1180 "ccsid01149", |
|
1181 "cp01149", |
|
1182 // "ebcdic-s-871+euro" |
|
1183 } ); |
|
1184 |
|
1185 aliasCheck("IBM00858" , |
|
1186 new String[] { |
|
1187 "cp858", // JDK historical |
|
1188 "ccsid00858", |
|
1189 "cp00858", |
|
1190 // "PC-Multilingual-850+euro" |
|
1191 } ); |
|
1192 |
|
1193 aliasCheck("x-MacRoman", |
|
1194 new String[] { |
|
1195 "MacRoman" // JDK historical |
|
1196 }); |
|
1197 |
|
1198 aliasCheck("x-MacCentralEurope", |
|
1199 new String[] { |
|
1200 "MacCentralEurope" // JDK historical |
|
1201 }); |
|
1202 |
|
1203 aliasCheck("x-MacCroatian", |
|
1204 new String[] { |
|
1205 "MacCroatian" // JDK historical |
|
1206 }); |
|
1207 |
|
1208 |
|
1209 aliasCheck("x-MacCroatian", |
|
1210 new String[] { |
|
1211 "MacCroatian" // JDK historical |
|
1212 }); |
|
1213 |
|
1214 |
|
1215 aliasCheck("x-MacGreek", |
|
1216 new String[] { |
|
1217 "MacGreek" // JDK historical |
|
1218 }); |
|
1219 |
|
1220 aliasCheck("x-MacCyrillic", |
|
1221 new String[] { |
|
1222 "MacCyrillic" // JDK historical |
|
1223 }); |
|
1224 |
|
1225 aliasCheck("x-MacUkraine", |
|
1226 new String[] { |
|
1227 "MacUkraine" // JDK historical |
|
1228 }); |
|
1229 |
|
1230 aliasCheck("x-MacTurkish", |
|
1231 new String[] { |
|
1232 "MacTurkish" // JDK historical |
|
1233 }); |
|
1234 |
|
1235 aliasCheck("x-MacArabic", |
|
1236 new String[] { |
|
1237 "MacArabic" // JDK historical |
|
1238 }); |
|
1239 |
|
1240 aliasCheck("x-MacHebrew", |
|
1241 new String[] { |
|
1242 "MacHebrew" // JDK historical |
|
1243 }); |
|
1244 |
|
1245 aliasCheck("x-MacIceland", |
|
1246 new String[] { |
|
1247 "MacIceland" // JDK historical |
|
1248 }); |
|
1249 |
|
1250 aliasCheck("x-MacRomania", |
|
1251 new String[] { |
|
1252 "MacRomania" // JDK historical |
|
1253 }); |
|
1254 |
|
1255 aliasCheck("x-MacThai", |
|
1256 new String[] { |
|
1257 "MacThai" // JDK historical |
|
1258 }); |
|
1259 |
|
1260 aliasCheck("x-MacSymbol", |
|
1261 new String[] { |
|
1262 "MacSymbol" // JDK historical |
|
1263 }); |
|
1264 |
|
1265 aliasCheck("x-MacDingbat", |
|
1266 new String[] { |
|
1267 "MacDingbat" // JDK historical |
|
1268 }); |
|
1269 } |
|
1270 } |