author | henryjen |
Tue, 24 Jun 2014 14:07:05 -0700 | |
changeset 25264 | 040625ce9b72 |
parent 23094 | 681fdd03de81 |
permissions | -rw-r--r-- |
6 | 1 |
/* |
2 |
* reserved comment block |
|
3 |
* DO NOT REMOVE OR ALTER! |
|
4 |
*/ |
|
5 |
/* |
|
23094
681fdd03de81
8035469: Xerces Update: EncodingMap does not recognize Java-style encodings Cp1141-Cp1149
joehw
parents:
12457
diff
changeset
|
6 |
* Licensed to the Apache Software Foundation (ASF) under one or more |
681fdd03de81
8035469: Xerces Update: EncodingMap does not recognize Java-style encodings Cp1141-Cp1149
joehw
parents:
12457
diff
changeset
|
7 |
* contributor license agreements. See the NOTICE file distributed with |
681fdd03de81
8035469: Xerces Update: EncodingMap does not recognize Java-style encodings Cp1141-Cp1149
joehw
parents:
12457
diff
changeset
|
8 |
* this work for additional information regarding copyright ownership. |
681fdd03de81
8035469: Xerces Update: EncodingMap does not recognize Java-style encodings Cp1141-Cp1149
joehw
parents:
12457
diff
changeset
|
9 |
* The ASF licenses this file to You under the Apache License, Version 2.0 |
681fdd03de81
8035469: Xerces Update: EncodingMap does not recognize Java-style encodings Cp1141-Cp1149
joehw
parents:
12457
diff
changeset
|
10 |
* (the "License"); you may not use this file except in compliance with |
681fdd03de81
8035469: Xerces Update: EncodingMap does not recognize Java-style encodings Cp1141-Cp1149
joehw
parents:
12457
diff
changeset
|
11 |
* the License. You may obtain a copy of the License at |
6 | 12 |
* |
13 |
* http://www.apache.org/licenses/LICENSE-2.0 |
|
14 |
* |
|
15 |
* Unless required by applicable law or agreed to in writing, software |
|
16 |
* distributed under the License is distributed on an "AS IS" BASIS, |
|
17 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
18 |
* See the License for the specific language governing permissions and |
|
19 |
* limitations under the License. |
|
20 |
*/ |
|
21 |
||
22 |
package com.sun.org.apache.xerces.internal.util; |
|
23 |
||
24 |
import java.util.Hashtable; |
|
25 |
||
26 |
/** |
|
27 |
* EncodingMap is a convenience class which handles conversions between |
|
28 |
* IANA encoding names and Java encoding names, and vice versa. The |
|
29 |
* encoding names used in XML instance documents <strong>must</strong> |
|
30 |
* be the IANA encoding names specified or one of the aliases for those names |
|
31 |
* which IANA defines. |
|
32 |
* <p> |
|
33 |
* <TABLE BORDER="0" WIDTH="100%"> |
|
34 |
* <TR> |
|
35 |
* <TD WIDTH="33%"> |
|
36 |
* <P ALIGN="CENTER"><B>Common Name</B> |
|
37 |
* </TD> |
|
38 |
* <TD WIDTH="15%"> |
|
39 |
* <P ALIGN="CENTER"><B>Use this name in XML files</B> |
|
40 |
* </TD> |
|
41 |
* <TD WIDTH="12%"> |
|
42 |
* <P ALIGN="CENTER"><B>Name Type</B> |
|
43 |
* </TD> |
|
44 |
* <TD WIDTH="31%"> |
|
45 |
* <P ALIGN="CENTER"><B>Xerces converts to this Java Encoder Name</B> |
|
46 |
* </TD> |
|
47 |
* </TR> |
|
48 |
* <TR> |
|
49 |
* <TD WIDTH="33%">8 bit Unicode</TD> |
|
50 |
* <TD WIDTH="15%"> |
|
51 |
* <P ALIGN="CENTER">UTF-8 |
|
52 |
* </TD> |
|
53 |
* <TD WIDTH="12%"> |
|
54 |
* <P ALIGN="CENTER">IANA |
|
55 |
* </TD> |
|
56 |
* <TD WIDTH="31%"> |
|
57 |
* <P ALIGN="CENTER">UTF8 |
|
58 |
* </TD> |
|
59 |
* </TR> |
|
60 |
* <TR> |
|
61 |
* <TD WIDTH="33%">ISO Latin 1</TD> |
|
62 |
* <TD WIDTH="15%"> |
|
63 |
* <P ALIGN="CENTER">ISO-8859-1 |
|
64 |
* </TD> |
|
65 |
* <TD WIDTH="12%"> |
|
66 |
* <P ALIGN="CENTER">MIME |
|
67 |
* </TD> |
|
68 |
* <TD WIDTH="31%"> |
|
69 |
* <P ALIGN="CENTER">ISO-8859-1 |
|
70 |
* </TD> |
|
71 |
* </TR> |
|
72 |
* <TR> |
|
73 |
* <TD WIDTH="33%">ISO Latin 2</TD> |
|
74 |
* <TD WIDTH="15%"> |
|
75 |
* <P ALIGN="CENTER">ISO-8859-2 |
|
76 |
* </TD> |
|
77 |
* <TD WIDTH="12%"> |
|
78 |
* <P ALIGN="CENTER">MIME |
|
79 |
* </TD> |
|
80 |
* <TD WIDTH="31%"> |
|
81 |
* <P ALIGN="CENTER">ISO-8859-2 |
|
82 |
* </TD> |
|
83 |
* </TR> |
|
84 |
* <TR> |
|
85 |
* <TD WIDTH="33%">ISO Latin 3</TD> |
|
86 |
* <TD WIDTH="15%"> |
|
87 |
* <P ALIGN="CENTER">ISO-8859-3 |
|
88 |
* </TD> |
|
89 |
* <TD WIDTH="12%"> |
|
90 |
* <P ALIGN="CENTER">MIME |
|
91 |
* </TD> |
|
92 |
* <TD WIDTH="31%"> |
|
93 |
* <P ALIGN="CENTER">ISO-8859-3 |
|
94 |
* </TD> |
|
95 |
* </TR> |
|
96 |
* <TR> |
|
97 |
* <TD WIDTH="33%">ISO Latin 4</TD> |
|
98 |
* <TD WIDTH="15%"> |
|
99 |
* <P ALIGN="CENTER">ISO-8859-4 |
|
100 |
* </TD> |
|
101 |
* <TD WIDTH="12%"> |
|
102 |
* <P ALIGN="CENTER">MIME |
|
103 |
* </TD> |
|
104 |
* <TD WIDTH="31%"> |
|
105 |
* <P ALIGN="CENTER">ISO-8859-4 |
|
106 |
* </TD> |
|
107 |
* </TR> |
|
108 |
* <TR> |
|
109 |
* <TD WIDTH="33%">ISO Latin Cyrillic</TD> |
|
110 |
* <TD WIDTH="15%"> |
|
111 |
* <P ALIGN="CENTER">ISO-8859-5 |
|
112 |
* </TD> |
|
113 |
* <TD WIDTH="12%"> |
|
114 |
* <P ALIGN="CENTER">MIME |
|
115 |
* </TD> |
|
116 |
* <TD WIDTH="31%"> |
|
117 |
* <P ALIGN="CENTER">ISO-8859-5 |
|
118 |
* </TD> |
|
119 |
* </TR> |
|
120 |
* <TR> |
|
121 |
* <TD WIDTH="33%">ISO Latin Arabic</TD> |
|
122 |
* <TD WIDTH="15%"> |
|
123 |
* <P ALIGN="CENTER">ISO-8859-6 |
|
124 |
* </TD> |
|
125 |
* <TD WIDTH="12%"> |
|
126 |
* <P ALIGN="CENTER">MIME |
|
127 |
* </TD> |
|
128 |
* <TD WIDTH="31%"> |
|
129 |
* <P ALIGN="CENTER">ISO-8859-6 |
|
130 |
* </TD> |
|
131 |
* </TR> |
|
132 |
* <TR> |
|
133 |
* <TD WIDTH="33%">ISO Latin Greek</TD> |
|
134 |
* <TD WIDTH="15%"> |
|
135 |
* <P ALIGN="CENTER">ISO-8859-7 |
|
136 |
* </TD> |
|
137 |
* <TD WIDTH="12%"> |
|
138 |
* <P ALIGN="CENTER">MIME |
|
139 |
* </TD> |
|
140 |
* <TD WIDTH="31%"> |
|
141 |
* <P ALIGN="CENTER">ISO-8859-7 |
|
142 |
* </TD> |
|
143 |
* </TR> |
|
144 |
* <TR> |
|
145 |
* <TD WIDTH="33%">ISO Latin Hebrew</TD> |
|
146 |
* <TD WIDTH="15%"> |
|
147 |
* <P ALIGN="CENTER">ISO-8859-8 |
|
148 |
* </TD> |
|
149 |
* <TD WIDTH="12%"> |
|
150 |
* <P ALIGN="CENTER">MIME |
|
151 |
* </TD> |
|
152 |
* <TD WIDTH="31%"> |
|
153 |
* <P ALIGN="CENTER">ISO-8859-8 |
|
154 |
* </TD> |
|
155 |
* </TR> |
|
156 |
* <TR> |
|
157 |
* <TD WIDTH="33%">ISO Latin 5</TD> |
|
158 |
* <TD WIDTH="15%"> |
|
159 |
* <P ALIGN="CENTER">ISO-8859-9 |
|
160 |
* </TD> |
|
161 |
* <TD WIDTH="12%"> |
|
162 |
* <P ALIGN="CENTER">MIME |
|
163 |
* </TD> |
|
164 |
* <TD WIDTH="31%"> |
|
165 |
* <P ALIGN="CENTER">ISO-8859-9 |
|
166 |
* </TD> |
|
167 |
* </TR> |
|
168 |
* <TR> |
|
169 |
* <TD WIDTH="33%">EBCDIC: US</TD> |
|
170 |
* <TD WIDTH="15%"> |
|
171 |
* <P ALIGN="CENTER">ebcdic-cp-us |
|
172 |
* </TD> |
|
173 |
* <TD WIDTH="12%"> |
|
174 |
* <P ALIGN="CENTER">IANA |
|
175 |
* </TD> |
|
176 |
* <TD WIDTH="31%"> |
|
177 |
* <P ALIGN="CENTER">cp037 |
|
178 |
* </TD> |
|
179 |
* </TR> |
|
180 |
* <TR> |
|
181 |
* <TD WIDTH="33%">EBCDIC: Canada</TD> |
|
182 |
* <TD WIDTH="15%"> |
|
183 |
* <P ALIGN="CENTER">ebcdic-cp-ca |
|
184 |
* </TD> |
|
185 |
* <TD WIDTH="12%"> |
|
186 |
* <P ALIGN="CENTER">IANA |
|
187 |
* </TD> |
|
188 |
* <TD WIDTH="31%"> |
|
189 |
* <P ALIGN="CENTER">cp037 |
|
190 |
* </TD> |
|
191 |
* </TR> |
|
192 |
* <TR> |
|
193 |
* <TD WIDTH="33%">EBCDIC: Netherlands</TD> |
|
194 |
* <TD WIDTH="15%"> |
|
195 |
* <P ALIGN="CENTER">ebcdic-cp-nl |
|
196 |
* </TD> |
|
197 |
* <TD WIDTH="12%"> |
|
198 |
* <P ALIGN="CENTER">IANA |
|
199 |
* </TD> |
|
200 |
* <TD WIDTH="31%"> |
|
201 |
* <P ALIGN="CENTER">cp037 |
|
202 |
* </TD> |
|
203 |
* </TR> |
|
204 |
* <TR> |
|
205 |
* <TD WIDTH="33%">EBCDIC: Denmark</TD> |
|
206 |
* <TD WIDTH="15%"> |
|
207 |
* <P ALIGN="CENTER">ebcdic-cp-dk |
|
208 |
* </TD> |
|
209 |
* <TD WIDTH="12%"> |
|
210 |
* <P ALIGN="CENTER">IANA |
|
211 |
* </TD> |
|
212 |
* <TD WIDTH="31%"> |
|
213 |
* <P ALIGN="CENTER">cp277 |
|
214 |
* </TD> |
|
215 |
* </TR> |
|
216 |
* <TR> |
|
217 |
* <TD WIDTH="33%">EBCDIC: Norway</TD> |
|
218 |
* <TD WIDTH="15%"> |
|
219 |
* <P ALIGN="CENTER">ebcdic-cp-no |
|
220 |
* </TD> |
|
221 |
* <TD WIDTH="12%"> |
|
222 |
* <P ALIGN="CENTER">IANA |
|
223 |
* </TD> |
|
224 |
* <TD WIDTH="31%"> |
|
225 |
* <P ALIGN="CENTER">cp277 |
|
226 |
* </TD> |
|
227 |
* </TR> |
|
228 |
* <TR> |
|
229 |
* <TD WIDTH="33%">EBCDIC: Finland</TD> |
|
230 |
* <TD WIDTH="15%"> |
|
231 |
* <P ALIGN="CENTER">ebcdic-cp-fi |
|
232 |
* </TD> |
|
233 |
* <TD WIDTH="12%"> |
|
234 |
* <P ALIGN="CENTER">IANA |
|
235 |
* </TD> |
|
236 |
* <TD WIDTH="31%"> |
|
237 |
* <P ALIGN="CENTER">cp278 |
|
238 |
* </TD> |
|
239 |
* </TR> |
|
240 |
* <TR> |
|
241 |
* <TD WIDTH="33%">EBCDIC: Sweden</TD> |
|
242 |
* <TD WIDTH="15%"> |
|
243 |
* <P ALIGN="CENTER">ebcdic-cp-se |
|
244 |
* </TD> |
|
245 |
* <TD WIDTH="12%"> |
|
246 |
* <P ALIGN="CENTER">IANA |
|
247 |
* </TD> |
|
248 |
* <TD WIDTH="31%"> |
|
249 |
* <P ALIGN="CENTER">cp278 |
|
250 |
* </TD> |
|
251 |
* </TR> |
|
252 |
* <TR> |
|
253 |
* <TD WIDTH="33%">EBCDIC: Italy</TD> |
|
254 |
* <TD WIDTH="15%"> |
|
255 |
* <P ALIGN="CENTER">ebcdic-cp-it |
|
256 |
* </TD> |
|
257 |
* <TD WIDTH="12%"> |
|
258 |
* <P ALIGN="CENTER">IANA |
|
259 |
* </TD> |
|
260 |
* <TD WIDTH="31%"> |
|
261 |
* <P ALIGN="CENTER">cp280 |
|
262 |
* </TD> |
|
263 |
* </TR> |
|
264 |
* <TR> |
|
265 |
* <TD WIDTH="33%">EBCDIC: Spain, Latin America</TD> |
|
266 |
* <TD WIDTH="15%"> |
|
267 |
* <P ALIGN="CENTER">ebcdic-cp-es |
|
268 |
* </TD> |
|
269 |
* <TD WIDTH="12%"> |
|
270 |
* <P ALIGN="CENTER">IANA |
|
271 |
* </TD> |
|
272 |
* <TD WIDTH="31%"> |
|
273 |
* <P ALIGN="CENTER">cp284 |
|
274 |
* </TD> |
|
275 |
* </TR> |
|
276 |
* <TR> |
|
277 |
* <TD WIDTH="33%">EBCDIC: Great Britain</TD> |
|
278 |
* <TD WIDTH="15%"> |
|
279 |
* <P ALIGN="CENTER">ebcdic-cp-gb |
|
280 |
* </TD> |
|
281 |
* <TD WIDTH="12%"> |
|
282 |
* <P ALIGN="CENTER">IANA |
|
283 |
* </TD> |
|
284 |
* <TD WIDTH="31%"> |
|
285 |
* <P ALIGN="CENTER">cp285 |
|
286 |
* </TD> |
|
287 |
* </TR> |
|
288 |
* <TR> |
|
289 |
* <TD WIDTH="33%">EBCDIC: France</TD> |
|
290 |
* <TD WIDTH="15%"> |
|
291 |
* <P ALIGN="CENTER">ebcdic-cp-fr |
|
292 |
* </TD> |
|
293 |
* <TD WIDTH="12%"> |
|
294 |
* <P ALIGN="CENTER">IANA |
|
295 |
* </TD> |
|
296 |
* <TD WIDTH="31%"> |
|
297 |
* <P ALIGN="CENTER">cp297 |
|
298 |
* </TD> |
|
299 |
* </TR> |
|
300 |
* <TR> |
|
301 |
* <TD WIDTH="33%">EBCDIC: Arabic</TD> |
|
302 |
* <TD WIDTH="15%"> |
|
303 |
* <P ALIGN="CENTER">ebcdic-cp-ar1 |
|
304 |
* </TD> |
|
305 |
* <TD WIDTH="12%"> |
|
306 |
* <P ALIGN="CENTER">IANA |
|
307 |
* </TD> |
|
308 |
* <TD WIDTH="31%"> |
|
309 |
* <P ALIGN="CENTER">cp420 |
|
310 |
* </TD> |
|
311 |
* </TR> |
|
312 |
* <TR> |
|
313 |
* <TD WIDTH="33%">EBCDIC: Hebrew</TD> |
|
314 |
* <TD WIDTH="15%"> |
|
315 |
* <P ALIGN="CENTER">ebcdic-cp-he |
|
316 |
* </TD> |
|
317 |
* <TD WIDTH="12%"> |
|
318 |
* <P ALIGN="CENTER">IANA |
|
319 |
* </TD> |
|
320 |
* <TD WIDTH="31%"> |
|
321 |
* <P ALIGN="CENTER">cp424 |
|
322 |
* </TD> |
|
323 |
* </TR> |
|
324 |
* <TR> |
|
325 |
* <TD WIDTH="33%">EBCDIC: Switzerland</TD> |
|
326 |
* <TD WIDTH="15%"> |
|
327 |
* <P ALIGN="CENTER">ebcdic-cp-ch |
|
328 |
* </TD> |
|
329 |
* <TD WIDTH="12%"> |
|
330 |
* <P ALIGN="CENTER">IANA |
|
331 |
* </TD> |
|
332 |
* <TD WIDTH="31%"> |
|
333 |
* <P ALIGN="CENTER">cp500 |
|
334 |
* </TD> |
|
335 |
* </TR> |
|
336 |
* <TR> |
|
337 |
* <TD WIDTH="33%">EBCDIC: Roece</TD> |
|
338 |
* <TD WIDTH="15%"> |
|
339 |
* <P ALIGN="CENTER">ebcdic-cp-roece |
|
340 |
* </TD> |
|
341 |
* <TD WIDTH="12%"> |
|
342 |
* <P ALIGN="CENTER">IANA |
|
343 |
* </TD> |
|
344 |
* <TD WIDTH="31%"> |
|
345 |
* <P ALIGN="CENTER">cp870 |
|
346 |
* </TD> |
|
347 |
* </TR> |
|
348 |
* <TR> |
|
349 |
* <TD WIDTH="33%">EBCDIC: Yugoslavia</TD> |
|
350 |
* <TD WIDTH="15%"> |
|
351 |
* <P ALIGN="CENTER">ebcdic-cp-yu |
|
352 |
* </TD> |
|
353 |
* <TD WIDTH="12%"> |
|
354 |
* <P ALIGN="CENTER">IANA |
|
355 |
* </TD> |
|
356 |
* <TD WIDTH="31%"> |
|
357 |
* <P ALIGN="CENTER">cp870 |
|
358 |
* </TD> |
|
359 |
* </TR> |
|
360 |
* <TR> |
|
361 |
* <TD WIDTH="33%">EBCDIC: Iceland</TD> |
|
362 |
* <TD WIDTH="15%"> |
|
363 |
* <P ALIGN="CENTER">ebcdic-cp-is |
|
364 |
* </TD> |
|
365 |
* <TD WIDTH="12%"> |
|
366 |
* <P ALIGN="CENTER">IANA |
|
367 |
* </TD> |
|
368 |
* <TD WIDTH="31%"> |
|
369 |
* <P ALIGN="CENTER">cp871 |
|
370 |
* </TD> |
|
371 |
* </TR> |
|
372 |
* <TR> |
|
373 |
* <TD WIDTH="33%">EBCDIC: Urdu</TD> |
|
374 |
* <TD WIDTH="15%"> |
|
375 |
* <P ALIGN="CENTER">ebcdic-cp-ar2 |
|
376 |
* </TD> |
|
377 |
* <TD WIDTH="12%"> |
|
378 |
* <P ALIGN="CENTER">IANA |
|
379 |
* </TD> |
|
380 |
* <TD WIDTH="31%"> |
|
381 |
* <P ALIGN="CENTER">cp918 |
|
382 |
* </TD> |
|
383 |
* </TR> |
|
384 |
* <TR> |
|
385 |
* <TD WIDTH="33%">Chinese for PRC, mixed 1/2 byte</TD> |
|
386 |
* <TD WIDTH="15%"> |
|
387 |
* <P ALIGN="CENTER">gb2312 |
|
388 |
* </TD> |
|
389 |
* <TD WIDTH="12%"> |
|
390 |
* <P ALIGN="CENTER">MIME |
|
391 |
* </TD> |
|
392 |
* <TD WIDTH="31%"> |
|
393 |
* <P ALIGN="CENTER">GB2312 |
|
394 |
* </TD> |
|
395 |
* </TR> |
|
396 |
* <TR> |
|
397 |
* <TD WIDTH="33%">Extended Unix Code, packed for Japanese</TD> |
|
398 |
* <TD WIDTH="15%"> |
|
399 |
* <P ALIGN="CENTER">euc-jp |
|
400 |
* </TD> |
|
401 |
* <TD WIDTH="12%"> |
|
402 |
* <P ALIGN="CENTER">MIME |
|
403 |
* </TD> |
|
404 |
* <TD WIDTH="31%"> |
|
405 |
* <P ALIGN="CENTER">eucjis |
|
406 |
* </TD> |
|
407 |
* </TR> |
|
408 |
* <TR> |
|
409 |
* <TD WIDTH="33%">Japanese: iso-2022-jp</TD> |
|
410 |
* <TD WIDTH="15%"> |
|
411 |
* <P ALIGN="CENTER">iso-2020-jp |
|
412 |
* </TD> |
|
413 |
* <TD WIDTH="12%"> |
|
414 |
* <P ALIGN="CENTER">MIME |
|
415 |
* </TD> |
|
416 |
* <TD WIDTH="31%"> |
|
417 |
* <P ALIGN="CENTER">JIS |
|
418 |
* </TD> |
|
419 |
* </TR> |
|
420 |
* <TR> |
|
421 |
* <TD WIDTH="33%">Japanese: Shift JIS</TD> |
|
422 |
* <TD WIDTH="15%"> |
|
423 |
* <P ALIGN="CENTER">Shift_JIS |
|
424 |
* </TD> |
|
425 |
* <TD WIDTH="12%"> |
|
426 |
* <P ALIGN="CENTER">MIME |
|
427 |
* </TD> |
|
428 |
* <TD WIDTH="31%"> |
|
429 |
* <P ALIGN="CENTER">SJIS |
|
430 |
* </TD> |
|
431 |
* </TR> |
|
432 |
* <TR> |
|
433 |
* <TD WIDTH="33%">Chinese: Big5</TD> |
|
434 |
* <TD WIDTH="15%"> |
|
435 |
* <P ALIGN="CENTER">Big5 |
|
436 |
* </TD> |
|
437 |
* <TD WIDTH="12%"> |
|
438 |
* <P ALIGN="CENTER">MIME |
|
439 |
* </TD> |
|
440 |
* <TD WIDTH="31%"> |
|
441 |
* <P ALIGN="CENTER">Big5 |
|
442 |
* </TD> |
|
443 |
* </TR> |
|
444 |
* <TR> |
|
445 |
* <TD WIDTH="33%">Extended Unix Code, packed for Korean</TD> |
|
446 |
* <TD WIDTH="15%"> |
|
447 |
* <P ALIGN="CENTER">euc-kr |
|
448 |
* </TD> |
|
449 |
* <TD WIDTH="12%"> |
|
450 |
* <P ALIGN="CENTER">MIME |
|
451 |
* </TD> |
|
452 |
* <TD WIDTH="31%"> |
|
453 |
* <P ALIGN="CENTER">iso2022kr |
|
454 |
* </TD> |
|
455 |
* </TR> |
|
456 |
* <TR> |
|
457 |
* <TD WIDTH="33%">Cyrillic</TD> |
|
458 |
* <TD WIDTH="15%"> |
|
459 |
* <P ALIGN="CENTER">koi8-r |
|
460 |
* </TD> |
|
461 |
* <TD WIDTH="12%"> |
|
462 |
* <P ALIGN="CENTER">MIME |
|
463 |
* </TD> |
|
464 |
* <TD WIDTH="31%"> |
|
465 |
* <P ALIGN="CENTER">koi8-r |
|
466 |
* </TD> |
|
467 |
* </TR> |
|
468 |
* </TABLE> |
|
469 |
* |
|
470 |
* @author TAMURA Kent, IBM |
|
471 |
* @author Andy Clark, IBM |
|
472 |
* |
|
473 |
*/ |
|
474 |
public class EncodingMap { |
|
475 |
||
476 |
// |
|
477 |
// Data |
|
478 |
// |
|
479 |
||
480 |
/** fIANA2JavaMap */ |
|
481 |
protected final static Hashtable fIANA2JavaMap = new Hashtable(); |
|
482 |
||
483 |
/** fJava2IANAMap */ |
|
484 |
protected final static Hashtable fJava2IANAMap = new Hashtable(); |
|
485 |
||
486 |
// |
|
487 |
// Static initialization |
|
488 |
// |
|
489 |
||
490 |
static { |
|
491 |
||
492 |
// add IANA to Java encoding mappings. |
|
493 |
fIANA2JavaMap.put("BIG5", "Big5"); |
|
494 |
fIANA2JavaMap.put("CSBIG5", "Big5"); |
|
495 |
fIANA2JavaMap.put("CP037", "CP037"); |
|
496 |
fIANA2JavaMap.put("IBM037", "CP037"); |
|
497 |
fIANA2JavaMap.put("CSIBM037", "CP037"); |
|
498 |
fIANA2JavaMap.put("EBCDIC-CP-US", "CP037"); |
|
499 |
fIANA2JavaMap.put("EBCDIC-CP-CA", "CP037"); |
|
500 |
fIANA2JavaMap.put("EBCDIC-CP-NL", "CP037"); |
|
501 |
fIANA2JavaMap.put("EBCDIC-CP-WT", "CP037"); |
|
502 |
fIANA2JavaMap.put("IBM273", "CP273"); |
|
503 |
fIANA2JavaMap.put("CP273", "CP273"); |
|
504 |
fIANA2JavaMap.put("CSIBM273", "CP273"); |
|
505 |
fIANA2JavaMap.put("IBM277", "CP277"); |
|
506 |
fIANA2JavaMap.put("CP277", "CP277"); |
|
507 |
fIANA2JavaMap.put("CSIBM277", "CP277"); |
|
508 |
fIANA2JavaMap.put("EBCDIC-CP-DK", "CP277"); |
|
509 |
fIANA2JavaMap.put("EBCDIC-CP-NO", "CP277"); |
|
510 |
fIANA2JavaMap.put("IBM278", "CP278"); |
|
511 |
fIANA2JavaMap.put("CP278", "CP278"); |
|
512 |
fIANA2JavaMap.put("CSIBM278", "CP278"); |
|
513 |
fIANA2JavaMap.put("EBCDIC-CP-FI", "CP278"); |
|
514 |
fIANA2JavaMap.put("EBCDIC-CP-SE", "CP278"); |
|
515 |
fIANA2JavaMap.put("IBM280", "CP280"); |
|
516 |
fIANA2JavaMap.put("CP280", "CP280"); |
|
517 |
fIANA2JavaMap.put("CSIBM280", "CP280"); |
|
518 |
fIANA2JavaMap.put("EBCDIC-CP-IT", "CP280"); |
|
519 |
fIANA2JavaMap.put("IBM284", "CP284"); |
|
520 |
fIANA2JavaMap.put("CP284", "CP284"); |
|
521 |
fIANA2JavaMap.put("CSIBM284", "CP284"); |
|
522 |
fIANA2JavaMap.put("EBCDIC-CP-ES", "CP284"); |
|
523 |
fIANA2JavaMap.put("EBCDIC-CP-GB", "CP285"); |
|
524 |
fIANA2JavaMap.put("IBM285", "CP285"); |
|
525 |
fIANA2JavaMap.put("CP285", "CP285"); |
|
526 |
fIANA2JavaMap.put("CSIBM285", "CP285"); |
|
527 |
fIANA2JavaMap.put("EBCDIC-JP-KANA", "CP290"); |
|
528 |
fIANA2JavaMap.put("IBM290", "CP290"); |
|
529 |
fIANA2JavaMap.put("CP290", "CP290"); |
|
530 |
fIANA2JavaMap.put("CSIBM290", "CP290"); |
|
531 |
fIANA2JavaMap.put("EBCDIC-CP-FR", "CP297"); |
|
532 |
fIANA2JavaMap.put("IBM297", "CP297"); |
|
533 |
fIANA2JavaMap.put("CP297", "CP297"); |
|
534 |
fIANA2JavaMap.put("CSIBM297", "CP297"); |
|
535 |
fIANA2JavaMap.put("EBCDIC-CP-AR1", "CP420"); |
|
536 |
fIANA2JavaMap.put("IBM420", "CP420"); |
|
537 |
fIANA2JavaMap.put("CP420", "CP420"); |
|
538 |
fIANA2JavaMap.put("CSIBM420", "CP420"); |
|
539 |
fIANA2JavaMap.put("EBCDIC-CP-HE", "CP424"); |
|
540 |
fIANA2JavaMap.put("IBM424", "CP424"); |
|
541 |
fIANA2JavaMap.put("CP424", "CP424"); |
|
542 |
fIANA2JavaMap.put("CSIBM424", "CP424"); |
|
543 |
fIANA2JavaMap.put("IBM437", "CP437"); |
|
544 |
fIANA2JavaMap.put("437", "CP437"); |
|
545 |
fIANA2JavaMap.put("CP437", "CP437"); |
|
546 |
fIANA2JavaMap.put("CSPC8CODEPAGE437", "CP437"); |
|
547 |
fIANA2JavaMap.put("EBCDIC-CP-CH", "CP500"); |
|
548 |
fIANA2JavaMap.put("IBM500", "CP500"); |
|
549 |
fIANA2JavaMap.put("CP500", "CP500"); |
|
550 |
fIANA2JavaMap.put("CSIBM500", "CP500"); |
|
551 |
fIANA2JavaMap.put("EBCDIC-CP-CH", "CP500"); |
|
552 |
fIANA2JavaMap.put("EBCDIC-CP-BE", "CP500"); |
|
553 |
fIANA2JavaMap.put("IBM775", "CP775"); |
|
554 |
fIANA2JavaMap.put("CP775", "CP775"); |
|
555 |
fIANA2JavaMap.put("CSPC775BALTIC", "CP775"); |
|
556 |
fIANA2JavaMap.put("IBM850", "CP850"); |
|
557 |
fIANA2JavaMap.put("850", "CP850"); |
|
558 |
fIANA2JavaMap.put("CP850", "CP850"); |
|
559 |
fIANA2JavaMap.put("CSPC850MULTILINGUAL", "CP850"); |
|
560 |
fIANA2JavaMap.put("IBM852", "CP852"); |
|
561 |
fIANA2JavaMap.put("852", "CP852"); |
|
562 |
fIANA2JavaMap.put("CP852", "CP852"); |
|
563 |
fIANA2JavaMap.put("CSPCP852", "CP852"); |
|
564 |
fIANA2JavaMap.put("IBM855", "CP855"); |
|
565 |
fIANA2JavaMap.put("855", "CP855"); |
|
566 |
fIANA2JavaMap.put("CP855", "CP855"); |
|
567 |
fIANA2JavaMap.put("CSIBM855", "CP855"); |
|
568 |
fIANA2JavaMap.put("IBM857", "CP857"); |
|
569 |
fIANA2JavaMap.put("857", "CP857"); |
|
570 |
fIANA2JavaMap.put("CP857", "CP857"); |
|
571 |
fIANA2JavaMap.put("CSIBM857", "CP857"); |
|
572 |
fIANA2JavaMap.put("IBM00858", "CP858"); |
|
573 |
fIANA2JavaMap.put("CP00858", "CP858"); |
|
574 |
fIANA2JavaMap.put("CCSID00858", "CP858"); |
|
575 |
fIANA2JavaMap.put("IBM860", "CP860"); |
|
576 |
fIANA2JavaMap.put("860", "CP860"); |
|
577 |
fIANA2JavaMap.put("CP860", "CP860"); |
|
578 |
fIANA2JavaMap.put("CSIBM860", "CP860"); |
|
579 |
fIANA2JavaMap.put("IBM861", "CP861"); |
|
580 |
fIANA2JavaMap.put("861", "CP861"); |
|
581 |
fIANA2JavaMap.put("CP861", "CP861"); |
|
582 |
fIANA2JavaMap.put("CP-IS", "CP861"); |
|
583 |
fIANA2JavaMap.put("CSIBM861", "CP861"); |
|
584 |
fIANA2JavaMap.put("IBM862", "CP862"); |
|
585 |
fIANA2JavaMap.put("862", "CP862"); |
|
586 |
fIANA2JavaMap.put("CP862", "CP862"); |
|
587 |
fIANA2JavaMap.put("CSPC862LATINHEBREW", "CP862"); |
|
588 |
fIANA2JavaMap.put("IBM863", "CP863"); |
|
589 |
fIANA2JavaMap.put("863", "CP863"); |
|
590 |
fIANA2JavaMap.put("CP863", "CP863"); |
|
591 |
fIANA2JavaMap.put("CSIBM863", "CP863"); |
|
592 |
fIANA2JavaMap.put("IBM864", "CP864"); |
|
593 |
fIANA2JavaMap.put("CP864", "CP864"); |
|
594 |
fIANA2JavaMap.put("CSIBM864", "CP864"); |
|
595 |
fIANA2JavaMap.put("IBM865", "CP865"); |
|
596 |
fIANA2JavaMap.put("865", "CP865"); |
|
597 |
fIANA2JavaMap.put("CP865", "CP865"); |
|
598 |
fIANA2JavaMap.put("CSIBM865", "CP865"); |
|
599 |
fIANA2JavaMap.put("IBM866", "CP866"); |
|
600 |
fIANA2JavaMap.put("866", "CP866"); |
|
601 |
fIANA2JavaMap.put("CP866", "CP866"); |
|
602 |
fIANA2JavaMap.put("CSIBM866", "CP866"); |
|
603 |
fIANA2JavaMap.put("IBM868", "CP868"); |
|
604 |
fIANA2JavaMap.put("CP868", "CP868"); |
|
605 |
fIANA2JavaMap.put("CSIBM868", "CP868"); |
|
606 |
fIANA2JavaMap.put("CP-AR", "CP868"); |
|
607 |
fIANA2JavaMap.put("IBM869", "CP869"); |
|
608 |
fIANA2JavaMap.put("CP869", "CP869"); |
|
609 |
fIANA2JavaMap.put("CSIBM869", "CP869"); |
|
610 |
fIANA2JavaMap.put("CP-GR", "CP869"); |
|
611 |
fIANA2JavaMap.put("IBM870", "CP870"); |
|
612 |
fIANA2JavaMap.put("CP870", "CP870"); |
|
613 |
fIANA2JavaMap.put("CSIBM870", "CP870"); |
|
614 |
fIANA2JavaMap.put("EBCDIC-CP-ROECE", "CP870"); |
|
615 |
fIANA2JavaMap.put("EBCDIC-CP-YU", "CP870"); |
|
616 |
fIANA2JavaMap.put("IBM871", "CP871"); |
|
617 |
fIANA2JavaMap.put("CP871", "CP871"); |
|
618 |
fIANA2JavaMap.put("CSIBM871", "CP871"); |
|
619 |
fIANA2JavaMap.put("EBCDIC-CP-IS", "CP871"); |
|
620 |
fIANA2JavaMap.put("IBM918", "CP918"); |
|
621 |
fIANA2JavaMap.put("CP918", "CP918"); |
|
622 |
fIANA2JavaMap.put("CSIBM918", "CP918"); |
|
623 |
fIANA2JavaMap.put("EBCDIC-CP-AR2", "CP918"); |
|
624 |
fIANA2JavaMap.put("IBM00924", "CP924"); |
|
625 |
fIANA2JavaMap.put("CP00924", "CP924"); |
|
626 |
fIANA2JavaMap.put("CCSID00924", "CP924"); |
|
627 |
// is this an error??? |
|
628 |
fIANA2JavaMap.put("EBCDIC-LATIN9--EURO", "CP924"); |
|
629 |
fIANA2JavaMap.put("IBM1026", "CP1026"); |
|
630 |
fIANA2JavaMap.put("CP1026", "CP1026"); |
|
631 |
fIANA2JavaMap.put("CSIBM1026", "CP1026"); |
|
632 |
fIANA2JavaMap.put("IBM01140", "Cp1140"); |
|
633 |
fIANA2JavaMap.put("CP01140", "Cp1140"); |
|
634 |
fIANA2JavaMap.put("CCSID01140", "Cp1140"); |
|
635 |
fIANA2JavaMap.put("IBM01141", "Cp1141"); |
|
636 |
fIANA2JavaMap.put("CP01141", "Cp1141"); |
|
637 |
fIANA2JavaMap.put("CCSID01141", "Cp1141"); |
|
638 |
fIANA2JavaMap.put("IBM01142", "Cp1142"); |
|
639 |
fIANA2JavaMap.put("CP01142", "Cp1142"); |
|
640 |
fIANA2JavaMap.put("CCSID01142", "Cp1142"); |
|
641 |
fIANA2JavaMap.put("IBM01143", "Cp1143"); |
|
642 |
fIANA2JavaMap.put("CP01143", "Cp1143"); |
|
643 |
fIANA2JavaMap.put("CCSID01143", "Cp1143"); |
|
644 |
fIANA2JavaMap.put("IBM01144", "Cp1144"); |
|
645 |
fIANA2JavaMap.put("CP01144", "Cp1144"); |
|
646 |
fIANA2JavaMap.put("CCSID01144", "Cp1144"); |
|
647 |
fIANA2JavaMap.put("IBM01145", "Cp1145"); |
|
648 |
fIANA2JavaMap.put("CP01145", "Cp1145"); |
|
649 |
fIANA2JavaMap.put("CCSID01145", "Cp1145"); |
|
650 |
fIANA2JavaMap.put("IBM01146", "Cp1146"); |
|
651 |
fIANA2JavaMap.put("CP01146", "Cp1146"); |
|
652 |
fIANA2JavaMap.put("CCSID01146", "Cp1146"); |
|
653 |
fIANA2JavaMap.put("IBM01147", "Cp1147"); |
|
654 |
fIANA2JavaMap.put("CP01147", "Cp1147"); |
|
655 |
fIANA2JavaMap.put("CCSID01147", "Cp1147"); |
|
656 |
fIANA2JavaMap.put("IBM01148", "Cp1148"); |
|
657 |
fIANA2JavaMap.put("CP01148", "Cp1148"); |
|
658 |
fIANA2JavaMap.put("CCSID01148", "Cp1148"); |
|
659 |
fIANA2JavaMap.put("IBM01149", "Cp1149"); |
|
660 |
fIANA2JavaMap.put("CP01149", "Cp1149"); |
|
661 |
fIANA2JavaMap.put("CCSID01149", "Cp1149"); |
|
662 |
fIANA2JavaMap.put("EUC-JP", "EUCJIS"); |
|
663 |
fIANA2JavaMap.put("CSEUCPKDFMTJAPANESE", "EUCJIS"); |
|
664 |
fIANA2JavaMap.put("EXTENDED_UNIX_CODE_PACKED_FORMAT_FOR_JAPANESE", "EUCJIS"); |
|
665 |
fIANA2JavaMap.put("EUC-KR", "KSC5601"); |
|
666 |
fIANA2JavaMap.put("CSEUCKR", "KSC5601"); |
|
667 |
fIANA2JavaMap.put("KS_C_5601-1987", "KS_C_5601-1987"); |
|
668 |
fIANA2JavaMap.put("ISO-IR-149", "KS_C_5601-1987"); |
|
669 |
fIANA2JavaMap.put("KS_C_5601-1989", "KS_C_5601-1987"); |
|
670 |
fIANA2JavaMap.put("KSC_5601", "KS_C_5601-1987"); |
|
671 |
fIANA2JavaMap.put("KOREAN", "KS_C_5601-1987"); |
|
672 |
fIANA2JavaMap.put("CSKSC56011987", "KS_C_5601-1987"); |
|
673 |
fIANA2JavaMap.put("GB2312", "GB2312"); |
|
674 |
fIANA2JavaMap.put("CSGB2312", "GB2312"); |
|
675 |
fIANA2JavaMap.put("ISO-2022-JP", "JIS"); |
|
676 |
fIANA2JavaMap.put("CSISO2022JP", "JIS"); |
|
677 |
fIANA2JavaMap.put("ISO-2022-KR", "ISO2022KR"); |
|
678 |
fIANA2JavaMap.put("CSISO2022KR", "ISO2022KR"); |
|
679 |
fIANA2JavaMap.put("ISO-2022-CN", "ISO2022CN"); |
|
680 |
||
681 |
fIANA2JavaMap.put("X0201", "JIS0201"); |
|
682 |
fIANA2JavaMap.put("CSISO13JISC6220JP", "JIS0201"); |
|
683 |
fIANA2JavaMap.put("X0208", "JIS0208"); |
|
684 |
fIANA2JavaMap.put("ISO-IR-87", "JIS0208"); |
|
685 |
fIANA2JavaMap.put("X0208dbiJIS_X0208-1983", "JIS0208"); |
|
686 |
fIANA2JavaMap.put("CSISO87JISX0208", "JIS0208"); |
|
687 |
fIANA2JavaMap.put("X0212", "JIS0212"); |
|
688 |
fIANA2JavaMap.put("ISO-IR-159", "JIS0212"); |
|
689 |
fIANA2JavaMap.put("CSISO159JISX02121990", "JIS0212"); |
|
690 |
fIANA2JavaMap.put("GB18030", "GB18030"); |
|
691 |
fIANA2JavaMap.put("GBK", "GBK"); |
|
692 |
fIANA2JavaMap.put("CP936", "GBK"); |
|
693 |
fIANA2JavaMap.put("MS936", "GBK"); |
|
694 |
fIANA2JavaMap.put("WINDOWS-936", "GBK"); |
|
695 |
fIANA2JavaMap.put("SHIFT_JIS", "SJIS"); |
|
696 |
fIANA2JavaMap.put("CSSHIFTJIS", "SJIS"); |
|
697 |
fIANA2JavaMap.put("MS_KANJI", "SJIS"); |
|
698 |
fIANA2JavaMap.put("WINDOWS-31J", "MS932"); |
|
699 |
fIANA2JavaMap.put("CSWINDOWS31J", "MS932"); |
|
700 |
||
701 |
// Add support for Cp1252 and its friends |
|
702 |
fIANA2JavaMap.put("WINDOWS-1250", "Cp1250"); |
|
703 |
fIANA2JavaMap.put("WINDOWS-1251", "Cp1251"); |
|
704 |
fIANA2JavaMap.put("WINDOWS-1252", "Cp1252"); |
|
705 |
fIANA2JavaMap.put("WINDOWS-1253", "Cp1253"); |
|
706 |
fIANA2JavaMap.put("WINDOWS-1254", "Cp1254"); |
|
707 |
fIANA2JavaMap.put("WINDOWS-1255", "Cp1255"); |
|
708 |
fIANA2JavaMap.put("WINDOWS-1256", "Cp1256"); |
|
709 |
fIANA2JavaMap.put("WINDOWS-1257", "Cp1257"); |
|
710 |
fIANA2JavaMap.put("WINDOWS-1258", "Cp1258"); |
|
711 |
fIANA2JavaMap.put("TIS-620", "TIS620"); |
|
712 |
||
713 |
fIANA2JavaMap.put("ISO-8859-1", "ISO8859_1"); |
|
714 |
fIANA2JavaMap.put("ISO-IR-100", "ISO8859_1"); |
|
715 |
fIANA2JavaMap.put("ISO_8859-1", "ISO8859_1"); |
|
716 |
fIANA2JavaMap.put("LATIN1", "ISO8859_1"); |
|
717 |
fIANA2JavaMap.put("CSISOLATIN1", "ISO8859_1"); |
|
718 |
fIANA2JavaMap.put("L1", "ISO8859_1"); |
|
719 |
fIANA2JavaMap.put("IBM819", "ISO8859_1"); |
|
720 |
fIANA2JavaMap.put("CP819", "ISO8859_1"); |
|
721 |
||
722 |
fIANA2JavaMap.put("ISO-8859-2", "ISO8859_2"); |
|
723 |
fIANA2JavaMap.put("ISO-IR-101", "ISO8859_2"); |
|
724 |
fIANA2JavaMap.put("ISO_8859-2", "ISO8859_2"); |
|
725 |
fIANA2JavaMap.put("LATIN2", "ISO8859_2"); |
|
726 |
fIANA2JavaMap.put("CSISOLATIN2", "ISO8859_2"); |
|
727 |
fIANA2JavaMap.put("L2", "ISO8859_2"); |
|
728 |
||
729 |
fIANA2JavaMap.put("ISO-8859-3", "ISO8859_3"); |
|
730 |
fIANA2JavaMap.put("ISO-IR-109", "ISO8859_3"); |
|
731 |
fIANA2JavaMap.put("ISO_8859-3", "ISO8859_3"); |
|
732 |
fIANA2JavaMap.put("LATIN3", "ISO8859_3"); |
|
733 |
fIANA2JavaMap.put("CSISOLATIN3", "ISO8859_3"); |
|
734 |
fIANA2JavaMap.put("L3", "ISO8859_3"); |
|
735 |
||
736 |
fIANA2JavaMap.put("ISO-8859-4", "ISO8859_4"); |
|
737 |
fIANA2JavaMap.put("ISO-IR-110", "ISO8859_4"); |
|
738 |
fIANA2JavaMap.put("ISO_8859-4", "ISO8859_4"); |
|
739 |
fIANA2JavaMap.put("LATIN4", "ISO8859_4"); |
|
740 |
fIANA2JavaMap.put("CSISOLATIN4", "ISO8859_4"); |
|
741 |
fIANA2JavaMap.put("L4", "ISO8859_4"); |
|
742 |
||
743 |
fIANA2JavaMap.put("ISO-8859-5", "ISO8859_5"); |
|
744 |
fIANA2JavaMap.put("ISO-IR-144", "ISO8859_5"); |
|
745 |
fIANA2JavaMap.put("ISO_8859-5", "ISO8859_5"); |
|
746 |
fIANA2JavaMap.put("CYRILLIC", "ISO8859_5"); |
|
747 |
fIANA2JavaMap.put("CSISOLATINCYRILLIC", "ISO8859_5"); |
|
748 |
||
749 |
fIANA2JavaMap.put("ISO-8859-6", "ISO8859_6"); |
|
750 |
fIANA2JavaMap.put("ISO-IR-127", "ISO8859_6"); |
|
751 |
fIANA2JavaMap.put("ISO_8859-6", "ISO8859_6"); |
|
752 |
fIANA2JavaMap.put("ECMA-114", "ISO8859_6"); |
|
753 |
fIANA2JavaMap.put("ASMO-708", "ISO8859_6"); |
|
754 |
fIANA2JavaMap.put("ARABIC", "ISO8859_6"); |
|
755 |
fIANA2JavaMap.put("CSISOLATINARABIC", "ISO8859_6"); |
|
756 |
||
757 |
fIANA2JavaMap.put("ISO-8859-7", "ISO8859_7"); |
|
758 |
fIANA2JavaMap.put("ISO-IR-126", "ISO8859_7"); |
|
759 |
fIANA2JavaMap.put("ISO_8859-7", "ISO8859_7"); |
|
760 |
fIANA2JavaMap.put("ELOT_928", "ISO8859_7"); |
|
761 |
fIANA2JavaMap.put("ECMA-118", "ISO8859_7"); |
|
762 |
fIANA2JavaMap.put("GREEK", "ISO8859_7"); |
|
763 |
fIANA2JavaMap.put("CSISOLATINGREEK", "ISO8859_7"); |
|
764 |
fIANA2JavaMap.put("GREEK8", "ISO8859_7"); |
|
765 |
||
766 |
fIANA2JavaMap.put("ISO-8859-8", "ISO8859_8"); |
|
767 |
fIANA2JavaMap.put("ISO-8859-8-I", "ISO8859_8"); // added since this encoding only differs w.r.t. presentation |
|
768 |
fIANA2JavaMap.put("ISO-IR-138", "ISO8859_8"); |
|
769 |
fIANA2JavaMap.put("ISO_8859-8", "ISO8859_8"); |
|
770 |
fIANA2JavaMap.put("HEBREW", "ISO8859_8"); |
|
771 |
fIANA2JavaMap.put("CSISOLATINHEBREW", "ISO8859_8"); |
|
772 |
||
773 |
fIANA2JavaMap.put("ISO-8859-9", "ISO8859_9"); |
|
774 |
fIANA2JavaMap.put("ISO-IR-148", "ISO8859_9"); |
|
775 |
fIANA2JavaMap.put("ISO_8859-9", "ISO8859_9"); |
|
776 |
fIANA2JavaMap.put("LATIN5", "ISO8859_9"); |
|
777 |
fIANA2JavaMap.put("CSISOLATIN5", "ISO8859_9"); |
|
778 |
fIANA2JavaMap.put("L5", "ISO8859_9"); |
|
779 |
||
780 |
fIANA2JavaMap.put("ISO-8859-13", "ISO8859_13"); |
|
781 |
||
782 |
fIANA2JavaMap.put("ISO-8859-15", "ISO8859_15_FDIS"); |
|
783 |
fIANA2JavaMap.put("ISO_8859-15", "ISO8859_15_FDIS"); |
|
784 |
fIANA2JavaMap.put("LATIN-9", "ISO8859_15_FDIS"); |
|
785 |
||
786 |
fIANA2JavaMap.put("KOI8-R", "KOI8_R"); |
|
787 |
fIANA2JavaMap.put("CSKOI8R", "KOI8_R"); |
|
788 |
fIANA2JavaMap.put("US-ASCII", "ASCII"); |
|
789 |
fIANA2JavaMap.put("ISO-IR-6", "ASCII"); |
|
790 |
fIANA2JavaMap.put("ANSI_X3.4-1968", "ASCII"); |
|
791 |
fIANA2JavaMap.put("ANSI_X3.4-1986", "ASCII"); |
|
792 |
fIANA2JavaMap.put("ISO_646.IRV:1991", "ASCII"); |
|
793 |
fIANA2JavaMap.put("ASCII", "ASCII"); |
|
794 |
fIANA2JavaMap.put("CSASCII", "ASCII"); |
|
795 |
fIANA2JavaMap.put("ISO646-US", "ASCII"); |
|
796 |
fIANA2JavaMap.put("US", "ASCII"); |
|
797 |
fIANA2JavaMap.put("IBM367", "ASCII"); |
|
798 |
fIANA2JavaMap.put("CP367", "ASCII"); |
|
799 |
fIANA2JavaMap.put("UTF-8", "UTF8"); |
|
800 |
fIANA2JavaMap.put("UTF-16", "UTF-16"); |
|
801 |
fIANA2JavaMap.put("UTF-16BE", "UnicodeBig"); |
|
802 |
fIANA2JavaMap.put("UTF-16LE", "UnicodeLittle"); |
|
803 |
||
804 |
// support for 1047, as proposed to be added to the |
|
805 |
// IANA registry in |
|
806 |
// http://lists.w3.org/Archives/Public/ietf-charset/2002JulSep/0049.html |
|
807 |
fIANA2JavaMap.put("IBM-1047", "Cp1047"); |
|
808 |
fIANA2JavaMap.put("IBM1047", "Cp1047"); |
|
809 |
fIANA2JavaMap.put("CP1047", "Cp1047"); |
|
810 |
||
811 |
// Adding new aliases as proposed in |
|
812 |
// http://lists.w3.org/Archives/Public/ietf-charset/2002JulSep/0058.html |
|
813 |
fIANA2JavaMap.put("IBM-37", "CP037"); |
|
814 |
fIANA2JavaMap.put("IBM-273", "CP273"); |
|
815 |
fIANA2JavaMap.put("IBM-277", "CP277"); |
|
816 |
fIANA2JavaMap.put("IBM-278", "CP278"); |
|
817 |
fIANA2JavaMap.put("IBM-280", "CP280"); |
|
818 |
fIANA2JavaMap.put("IBM-284", "CP284"); |
|
819 |
fIANA2JavaMap.put("IBM-285", "CP285"); |
|
820 |
fIANA2JavaMap.put("IBM-290", "CP290"); |
|
821 |
fIANA2JavaMap.put("IBM-297", "CP297"); |
|
822 |
fIANA2JavaMap.put("IBM-420", "CP420"); |
|
823 |
fIANA2JavaMap.put("IBM-424", "CP424"); |
|
824 |
fIANA2JavaMap.put("IBM-437", "CP437"); |
|
825 |
fIANA2JavaMap.put("IBM-500", "CP500"); |
|
826 |
fIANA2JavaMap.put("IBM-775", "CP775"); |
|
827 |
fIANA2JavaMap.put("IBM-850", "CP850"); |
|
828 |
fIANA2JavaMap.put("IBM-852", "CP852"); |
|
829 |
fIANA2JavaMap.put("IBM-855", "CP855"); |
|
830 |
fIANA2JavaMap.put("IBM-857", "CP857"); |
|
831 |
fIANA2JavaMap.put("IBM-858", "CP858"); |
|
832 |
fIANA2JavaMap.put("IBM-860", "CP860"); |
|
833 |
fIANA2JavaMap.put("IBM-861", "CP861"); |
|
834 |
fIANA2JavaMap.put("IBM-862", "CP862"); |
|
835 |
fIANA2JavaMap.put("IBM-863", "CP863"); |
|
836 |
fIANA2JavaMap.put("IBM-864", "CP864"); |
|
837 |
fIANA2JavaMap.put("IBM-865", "CP865"); |
|
838 |
fIANA2JavaMap.put("IBM-866", "CP866"); |
|
839 |
fIANA2JavaMap.put("IBM-868", "CP868"); |
|
840 |
fIANA2JavaMap.put("IBM-869", "CP869"); |
|
841 |
fIANA2JavaMap.put("IBM-870", "CP870"); |
|
842 |
fIANA2JavaMap.put("IBM-871", "CP871"); |
|
843 |
fIANA2JavaMap.put("IBM-918", "CP918"); |
|
844 |
fIANA2JavaMap.put("IBM-924", "CP924"); |
|
845 |
fIANA2JavaMap.put("IBM-1026", "CP1026"); |
|
846 |
fIANA2JavaMap.put("IBM-1140", "Cp1140"); |
|
847 |
fIANA2JavaMap.put("IBM-1141", "Cp1141"); |
|
848 |
fIANA2JavaMap.put("IBM-1142", "Cp1142"); |
|
849 |
fIANA2JavaMap.put("IBM-1143", "Cp1143"); |
|
850 |
fIANA2JavaMap.put("IBM-1144", "Cp1144"); |
|
851 |
fIANA2JavaMap.put("IBM-1145", "Cp1145"); |
|
852 |
fIANA2JavaMap.put("IBM-1146", "Cp1146"); |
|
853 |
fIANA2JavaMap.put("IBM-1147", "Cp1147"); |
|
854 |
fIANA2JavaMap.put("IBM-1148", "Cp1148"); |
|
855 |
fIANA2JavaMap.put("IBM-1149", "Cp1149"); |
|
856 |
fIANA2JavaMap.put("IBM-819", "ISO8859_1"); |
|
857 |
fIANA2JavaMap.put("IBM-367", "ASCII"); |
|
858 |
||
859 |
// REVISIT: |
|
860 |
// j:CNS11643 -> EUC-TW? |
|
861 |
// ISO-2022-CN? ISO-2022-CN-EXT? |
|
862 |
||
863 |
// add Java to IANA encoding mappings |
|
864 |
//fJava2IANAMap.put("8859_1", "US-ASCII"); // ? |
|
865 |
fJava2IANAMap.put("ISO8859_1", "ISO-8859-1"); |
|
866 |
fJava2IANAMap.put("ISO8859_2", "ISO-8859-2"); |
|
867 |
fJava2IANAMap.put("ISO8859_3", "ISO-8859-3"); |
|
868 |
fJava2IANAMap.put("ISO8859_4", "ISO-8859-4"); |
|
869 |
fJava2IANAMap.put("ISO8859_5", "ISO-8859-5"); |
|
870 |
fJava2IANAMap.put("ISO8859_6", "ISO-8859-6"); |
|
871 |
fJava2IANAMap.put("ISO8859_7", "ISO-8859-7"); |
|
872 |
fJava2IANAMap.put("ISO8859_8", "ISO-8859-8"); |
|
873 |
fJava2IANAMap.put("ISO8859_9", "ISO-8859-9"); |
|
874 |
fJava2IANAMap.put("ISO8859_13", "ISO-8859-13"); |
|
875 |
fJava2IANAMap.put("ISO8859_15", "ISO-8859-15"); |
|
876 |
fJava2IANAMap.put("ISO8859_15_FDIS", "ISO-8859-15"); |
|
877 |
fJava2IANAMap.put("Big5", "BIG5"); |
|
878 |
fJava2IANAMap.put("CP037", "EBCDIC-CP-US"); |
|
879 |
fJava2IANAMap.put("CP273", "IBM273"); |
|
880 |
fJava2IANAMap.put("CP277", "EBCDIC-CP-DK"); |
|
881 |
fJava2IANAMap.put("CP278", "EBCDIC-CP-FI"); |
|
882 |
fJava2IANAMap.put("CP280", "EBCDIC-CP-IT"); |
|
883 |
fJava2IANAMap.put("CP284", "EBCDIC-CP-ES"); |
|
884 |
fJava2IANAMap.put("CP285", "EBCDIC-CP-GB"); |
|
885 |
fJava2IANAMap.put("CP290", "EBCDIC-JP-KANA"); |
|
886 |
fJava2IANAMap.put("CP297", "EBCDIC-CP-FR"); |
|
887 |
fJava2IANAMap.put("CP420", "EBCDIC-CP-AR1"); |
|
888 |
fJava2IANAMap.put("CP424", "EBCDIC-CP-HE"); |
|
889 |
fJava2IANAMap.put("CP437", "IBM437"); |
|
890 |
fJava2IANAMap.put("CP500", "EBCDIC-CP-CH"); |
|
891 |
fJava2IANAMap.put("CP775", "IBM775"); |
|
892 |
fJava2IANAMap.put("CP850", "IBM850"); |
|
893 |
fJava2IANAMap.put("CP852", "IBM852"); |
|
894 |
fJava2IANAMap.put("CP855", "IBM855"); |
|
895 |
fJava2IANAMap.put("CP857", "IBM857"); |
|
896 |
fJava2IANAMap.put("CP858", "IBM00858"); |
|
897 |
fJava2IANAMap.put("CP860", "IBM860"); |
|
898 |
fJava2IANAMap.put("CP861", "IBM861"); |
|
899 |
fJava2IANAMap.put("CP862", "IBM862"); |
|
900 |
fJava2IANAMap.put("CP863", "IBM863"); |
|
901 |
fJava2IANAMap.put("CP864", "IBM864"); |
|
902 |
fJava2IANAMap.put("CP865", "IBM865"); |
|
903 |
fJava2IANAMap.put("CP866", "IBM866"); |
|
904 |
fJava2IANAMap.put("CP868", "IBM868"); |
|
905 |
fJava2IANAMap.put("CP869", "IBM869"); |
|
906 |
fJava2IANAMap.put("CP870", "EBCDIC-CP-ROECE"); |
|
907 |
fJava2IANAMap.put("CP871", "EBCDIC-CP-IS"); |
|
908 |
fJava2IANAMap.put("CP918", "EBCDIC-CP-AR2"); |
|
909 |
fJava2IANAMap.put("CP924", "IBM00924"); |
|
910 |
fJava2IANAMap.put("CP1026", "IBM1026"); |
|
23094
681fdd03de81
8035469: Xerces Update: EncodingMap does not recognize Java-style encodings Cp1141-Cp1149
joehw
parents:
12457
diff
changeset
|
911 |
fJava2IANAMap.put("CP1140", "IBM01140"); |
681fdd03de81
8035469: Xerces Update: EncodingMap does not recognize Java-style encodings Cp1141-Cp1149
joehw
parents:
12457
diff
changeset
|
912 |
fJava2IANAMap.put("CP1141", "IBM01141"); |
681fdd03de81
8035469: Xerces Update: EncodingMap does not recognize Java-style encodings Cp1141-Cp1149
joehw
parents:
12457
diff
changeset
|
913 |
fJava2IANAMap.put("CP1142", "IBM01142"); |
681fdd03de81
8035469: Xerces Update: EncodingMap does not recognize Java-style encodings Cp1141-Cp1149
joehw
parents:
12457
diff
changeset
|
914 |
fJava2IANAMap.put("CP1143", "IBM01143"); |
681fdd03de81
8035469: Xerces Update: EncodingMap does not recognize Java-style encodings Cp1141-Cp1149
joehw
parents:
12457
diff
changeset
|
915 |
fJava2IANAMap.put("CP1144", "IBM01144"); |
681fdd03de81
8035469: Xerces Update: EncodingMap does not recognize Java-style encodings Cp1141-Cp1149
joehw
parents:
12457
diff
changeset
|
916 |
fJava2IANAMap.put("CP1145", "IBM01145"); |
681fdd03de81
8035469: Xerces Update: EncodingMap does not recognize Java-style encodings Cp1141-Cp1149
joehw
parents:
12457
diff
changeset
|
917 |
fJava2IANAMap.put("CP1146", "IBM01146"); |
681fdd03de81
8035469: Xerces Update: EncodingMap does not recognize Java-style encodings Cp1141-Cp1149
joehw
parents:
12457
diff
changeset
|
918 |
fJava2IANAMap.put("CP1147", "IBM01147"); |
681fdd03de81
8035469: Xerces Update: EncodingMap does not recognize Java-style encodings Cp1141-Cp1149
joehw
parents:
12457
diff
changeset
|
919 |
fJava2IANAMap.put("CP1148", "IBM01148"); |
681fdd03de81
8035469: Xerces Update: EncodingMap does not recognize Java-style encodings Cp1141-Cp1149
joehw
parents:
12457
diff
changeset
|
920 |
fJava2IANAMap.put("CP1149", "IBM01149"); |
6 | 921 |
fJava2IANAMap.put("EUCJIS", "EUC-JP"); |
922 |
fJava2IANAMap.put("KS_C_5601-1987", "KS_C_5601-1987"); |
|
923 |
fJava2IANAMap.put("GB2312", "GB2312"); |
|
924 |
fJava2IANAMap.put("ISO2022KR", "ISO-2022-KR"); |
|
925 |
fJava2IANAMap.put("ISO2022CN", "ISO-2022-CN"); |
|
926 |
fJava2IANAMap.put("JIS", "ISO-2022-JP"); |
|
927 |
fJava2IANAMap.put("KOI8_R", "KOI8-R"); |
|
928 |
fJava2IANAMap.put("KSC5601", "EUC-KR"); |
|
929 |
fJava2IANAMap.put("GB18030", "GB18030"); |
|
930 |
fJava2IANAMap.put("GBK", "GBK"); |
|
931 |
fJava2IANAMap.put("SJIS", "SHIFT_JIS"); |
|
932 |
fJava2IANAMap.put("MS932", "WINDOWS-31J"); |
|
933 |
fJava2IANAMap.put("UTF8", "UTF-8"); |
|
934 |
fJava2IANAMap.put("Unicode", "UTF-16"); |
|
935 |
fJava2IANAMap.put("UnicodeBig", "UTF-16BE"); |
|
936 |
fJava2IANAMap.put("UnicodeLittle", "UTF-16LE"); |
|
937 |
fJava2IANAMap.put("JIS0201", "X0201"); |
|
938 |
fJava2IANAMap.put("JIS0208", "X0208"); |
|
939 |
fJava2IANAMap.put("JIS0212", "ISO-IR-159"); |
|
940 |
||
941 |
// proposed addition (see above for details): |
|
942 |
fJava2IANAMap.put("CP1047", "IBM1047"); |
|
943 |
||
944 |
} // <clinit>() |
|
945 |
||
946 |
// |
|
947 |
// Constructors |
|
948 |
// |
|
949 |
||
950 |
/** Default constructor. */ |
|
951 |
public EncodingMap() {} |
|
952 |
||
953 |
// |
|
954 |
// Public static methods |
|
955 |
// |
|
956 |
||
957 |
/** |
|
958 |
* Adds an IANA to Java encoding name mapping. |
|
959 |
* |
|
960 |
* @param ianaEncoding The IANA encoding name. |
|
961 |
* @param javaEncoding The Java encoding name. |
|
962 |
* |
|
963 |
* @deprecated Use of this method is not recommended. Its |
|
964 |
* effect is JVM wide and may cause unforeseen behaviour |
|
965 |
* for other applications running in the system. |
|
966 |
*/ |
|
967 |
public static void putIANA2JavaMapping(String ianaEncoding, |
|
968 |
String javaEncoding) { |
|
969 |
fIANA2JavaMap.put(ianaEncoding, javaEncoding); |
|
970 |
} // putIANA2JavaMapping(String,String) |
|
971 |
||
972 |
/** |
|
973 |
* Returns the Java encoding name for the specified IANA encoding name. |
|
974 |
* |
|
975 |
* @param ianaEncoding The IANA encoding name. |
|
976 |
*/ |
|
977 |
public static String getIANA2JavaMapping(String ianaEncoding) { |
|
978 |
return (String)fIANA2JavaMap.get(ianaEncoding); |
|
979 |
} // getIANA2JavaMapping(String):String |
|
980 |
||
981 |
/** |
|
982 |
* Removes an IANA to Java encoding name mapping. |
|
983 |
* |
|
984 |
* @param ianaEncoding The IANA encoding name. |
|
985 |
* |
|
986 |
* @deprecated Use of this method is not recommended. Its |
|
987 |
* effect is JVM wide and may cause unforeseen behaviour |
|
988 |
* for other applications running in the system. |
|
989 |
*/ |
|
990 |
public static String removeIANA2JavaMapping(String ianaEncoding) { |
|
991 |
return (String)fIANA2JavaMap.remove(ianaEncoding); |
|
992 |
} // removeIANA2JavaMapping(String):String |
|
993 |
||
994 |
/** |
|
995 |
* Adds a Java to IANA encoding name mapping. |
|
996 |
* |
|
997 |
* @param javaEncoding The Java encoding name. |
|
998 |
* @param ianaEncoding The IANA encoding name. |
|
999 |
* |
|
1000 |
* @deprecated Use of this method is not recommended. Its |
|
1001 |
* effect is JVM wide and may cause unforeseen behaviour |
|
1002 |
* for other applications running in the system. |
|
1003 |
*/ |
|
1004 |
public static void putJava2IANAMapping(String javaEncoding, |
|
1005 |
String ianaEncoding) { |
|
1006 |
fJava2IANAMap.put(javaEncoding, ianaEncoding); |
|
1007 |
} // putJava2IANAMapping(String,String) |
|
1008 |
||
1009 |
/** |
|
1010 |
* Returns the IANA encoding name for the specified Java encoding name. |
|
1011 |
* |
|
1012 |
* @param javaEncoding The Java encoding name. |
|
1013 |
*/ |
|
1014 |
public static String getJava2IANAMapping(String javaEncoding) { |
|
1015 |
return (String)fJava2IANAMap.get(javaEncoding); |
|
1016 |
} // getJava2IANAMapping(String):String |
|
1017 |
||
1018 |
/** |
|
1019 |
* Removes a Java to IANA encoding name mapping. |
|
1020 |
* |
|
1021 |
* @param javaEncoding The Java encoding name. |
|
1022 |
* |
|
1023 |
* @deprecated Use of this method is not recommended. Its |
|
1024 |
* effect is JVM wide and may cause unforeseen behaviour |
|
1025 |
* for other applications running in the system. |
|
1026 |
*/ |
|
1027 |
public static String removeJava2IANAMapping(String javaEncoding) { |
|
1028 |
return (String)fJava2IANAMap.remove(javaEncoding); |
|
1029 |
} // removeJava2IANAMapping |
|
1030 |
||
1031 |
} // class EncodingMap |