KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > jasper > xmlparser > EncodingMap


1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  * ====================================================================
17  *
18  * This software consists of voluntary contributions made by many
19  * individuals on behalf of the Apache Software Foundation and was
20  * originally based on software copyright (c) 1999, International
21  * Business Machines, Inc., http://www.apache.org. For more
22  * information on the Apache Software Foundation, please see
23  * <http://www.apache.org/>.
24  */

25
26 package org.apache.jasper.xmlparser;
27
28 import java.util.Hashtable JavaDoc;
29
30 /**
31  * EncodingMap is a convenience class which handles conversions between
32  * IANA encoding names and Java encoding names, and vice versa. The
33  * encoding names used in XML instance documents <strong>must</strong>
34  * be the IANA encoding names specified or one of the aliases for those names
35  * which IANA defines.
36  * <p>
37  * <TABLE BORDER="0" WIDTH="100%">
38  * <TR>
39  * <TD WIDTH="33%">
40  * <P ALIGN="CENTER"><B>Common Name</B>
41  * </TD>
42  * <TD WIDTH="15%">
43  * <P ALIGN="CENTER"><B>Use this name in XML files</B>
44  * </TD>
45  * <TD WIDTH="12%">
46  * <P ALIGN="CENTER"><B>Name Type</B>
47  * </TD>
48  * <TD WIDTH="31%">
49  * <P ALIGN="CENTER"><B>Xerces converts to this Java Encoder Name</B>
50  * </TD>
51  * </TR>
52  * <TR>
53  * <TD WIDTH="33%">8 bit Unicode</TD>
54  * <TD WIDTH="15%">
55  * <P ALIGN="CENTER">UTF-8
56  * </TD>
57  * <TD WIDTH="12%">
58  * <P ALIGN="CENTER">IANA
59  * </TD>
60  * <TD WIDTH="31%">
61  * <P ALIGN="CENTER">UTF8
62  * </TD>
63  * </TR>
64  * <TR>
65  * <TD WIDTH="33%">ISO Latin 1</TD>
66  * <TD WIDTH="15%">
67  * <P ALIGN="CENTER">ISO-8859-1
68  * </TD>
69  * <TD WIDTH="12%">
70  * <P ALIGN="CENTER">MIME
71  * </TD>
72  * <TD WIDTH="31%">
73  * <P ALIGN="CENTER">ISO-8859-1
74  * </TD>
75  * </TR>
76  * <TR>
77  * <TD WIDTH="33%">ISO Latin 2</TD>
78  * <TD WIDTH="15%">
79  * <P ALIGN="CENTER">ISO-8859-2
80  * </TD>
81  * <TD WIDTH="12%">
82  * <P ALIGN="CENTER">MIME
83  * </TD>
84  * <TD WIDTH="31%">
85  * <P ALIGN="CENTER">ISO-8859-2
86  * </TD>
87  * </TR>
88  * <TR>
89  * <TD WIDTH="33%">ISO Latin 3</TD>
90  * <TD WIDTH="15%">
91  * <P ALIGN="CENTER">ISO-8859-3
92  * </TD>
93  * <TD WIDTH="12%">
94  * <P ALIGN="CENTER">MIME
95  * </TD>
96  * <TD WIDTH="31%">
97  * <P ALIGN="CENTER">ISO-8859-3
98  * </TD>
99  * </TR>
100  * <TR>
101  * <TD WIDTH="33%">ISO Latin 4</TD>
102  * <TD WIDTH="15%">
103  * <P ALIGN="CENTER">ISO-8859-4
104  * </TD>
105  * <TD WIDTH="12%">
106  * <P ALIGN="CENTER">MIME
107  * </TD>
108  * <TD WIDTH="31%">
109  * <P ALIGN="CENTER">ISO-8859-4
110  * </TD>
111  * </TR>
112  * <TR>
113  * <TD WIDTH="33%">ISO Latin Cyrillic</TD>
114  * <TD WIDTH="15%">
115  * <P ALIGN="CENTER">ISO-8859-5
116  * </TD>
117  * <TD WIDTH="12%">
118  * <P ALIGN="CENTER">MIME
119  * </TD>
120  * <TD WIDTH="31%">
121  * <P ALIGN="CENTER">ISO-8859-5
122  * </TD>
123  * </TR>
124  * <TR>
125  * <TD WIDTH="33%">ISO Latin Arabic</TD>
126  * <TD WIDTH="15%">
127  * <P ALIGN="CENTER">ISO-8859-6
128  * </TD>
129  * <TD WIDTH="12%">
130  * <P ALIGN="CENTER">MIME
131  * </TD>
132  * <TD WIDTH="31%">
133  * <P ALIGN="CENTER">ISO-8859-6
134  * </TD>
135  * </TR>
136  * <TR>
137  * <TD WIDTH="33%">ISO Latin Greek</TD>
138  * <TD WIDTH="15%">
139  * <P ALIGN="CENTER">ISO-8859-7
140  * </TD>
141  * <TD WIDTH="12%">
142  * <P ALIGN="CENTER">MIME
143  * </TD>
144  * <TD WIDTH="31%">
145  * <P ALIGN="CENTER">ISO-8859-7
146  * </TD>
147  * </TR>
148  * <TR>
149  * <TD WIDTH="33%">ISO Latin Hebrew</TD>
150  * <TD WIDTH="15%">
151  * <P ALIGN="CENTER">ISO-8859-8
152  * </TD>
153  * <TD WIDTH="12%">
154  * <P ALIGN="CENTER">MIME
155  * </TD>
156  * <TD WIDTH="31%">
157  * <P ALIGN="CENTER">ISO-8859-8
158  * </TD>
159  * </TR>
160  * <TR>
161  * <TD WIDTH="33%">ISO Latin 5</TD>
162  * <TD WIDTH="15%">
163  * <P ALIGN="CENTER">ISO-8859-9
164  * </TD>
165  * <TD WIDTH="12%">
166  * <P ALIGN="CENTER">MIME
167  * </TD>
168  * <TD WIDTH="31%">
169  * <P ALIGN="CENTER">ISO-8859-9
170  * </TD>
171  * </TR>
172  * <TR>
173  * <TD WIDTH="33%">EBCDIC: US</TD>
174  * <TD WIDTH="15%">
175  * <P ALIGN="CENTER">ebcdic-cp-us
176  * </TD>
177  * <TD WIDTH="12%">
178  * <P ALIGN="CENTER">IANA
179  * </TD>
180  * <TD WIDTH="31%">
181  * <P ALIGN="CENTER">cp037
182  * </TD>
183  * </TR>
184  * <TR>
185  * <TD WIDTH="33%">EBCDIC: Canada</TD>
186  * <TD WIDTH="15%">
187  * <P ALIGN="CENTER">ebcdic-cp-ca
188  * </TD>
189  * <TD WIDTH="12%">
190  * <P ALIGN="CENTER">IANA
191  * </TD>
192  * <TD WIDTH="31%">
193  * <P ALIGN="CENTER">cp037
194  * </TD>
195  * </TR>
196  * <TR>
197  * <TD WIDTH="33%">EBCDIC: Netherlands</TD>
198  * <TD WIDTH="15%">
199  * <P ALIGN="CENTER">ebcdic-cp-nl
200  * </TD>
201  * <TD WIDTH="12%">
202  * <P ALIGN="CENTER">IANA
203  * </TD>
204  * <TD WIDTH="31%">
205  * <P ALIGN="CENTER">cp037
206  * </TD>
207  * </TR>
208  * <TR>
209  * <TD WIDTH="33%">EBCDIC: Denmark</TD>
210  * <TD WIDTH="15%">
211  * <P ALIGN="CENTER">ebcdic-cp-dk
212  * </TD>
213  * <TD WIDTH="12%">
214  * <P ALIGN="CENTER">IANA
215  * </TD>
216  * <TD WIDTH="31%">
217  * <P ALIGN="CENTER">cp277
218  * </TD>
219  * </TR>
220  * <TR>
221  * <TD WIDTH="33%">EBCDIC: Norway</TD>
222  * <TD WIDTH="15%">
223  * <P ALIGN="CENTER">ebcdic-cp-no
224  * </TD>
225  * <TD WIDTH="12%">
226  * <P ALIGN="CENTER">IANA
227  * </TD>
228  * <TD WIDTH="31%">
229  * <P ALIGN="CENTER">cp277
230  * </TD>
231  * </TR>
232  * <TR>
233  * <TD WIDTH="33%">EBCDIC: Finland</TD>
234  * <TD WIDTH="15%">
235  * <P ALIGN="CENTER">ebcdic-cp-fi
236  * </TD>
237  * <TD WIDTH="12%">
238  * <P ALIGN="CENTER">IANA
239  * </TD>
240  * <TD WIDTH="31%">
241  * <P ALIGN="CENTER">cp278
242  * </TD>
243  * </TR>
244  * <TR>
245  * <TD WIDTH="33%">EBCDIC: Sweden</TD>
246  * <TD WIDTH="15%">
247  * <P ALIGN="CENTER">ebcdic-cp-se
248  * </TD>
249  * <TD WIDTH="12%">
250  * <P ALIGN="CENTER">IANA
251  * </TD>
252  * <TD WIDTH="31%">
253  * <P ALIGN="CENTER">cp278
254  * </TD>
255  * </TR>
256  * <TR>
257  * <TD WIDTH="33%">EBCDIC: Italy</TD>
258  * <TD WIDTH="15%">
259  * <P ALIGN="CENTER">ebcdic-cp-it
260  * </TD>
261  * <TD WIDTH="12%">
262  * <P ALIGN="CENTER">IANA
263  * </TD>
264  * <TD WIDTH="31%">
265  * <P ALIGN="CENTER">cp280
266  * </TD>
267  * </TR>
268  * <TR>
269  * <TD WIDTH="33%">EBCDIC: Spain, Latin America</TD>
270  * <TD WIDTH="15%">
271  * <P ALIGN="CENTER">ebcdic-cp-es
272  * </TD>
273  * <TD WIDTH="12%">
274  * <P ALIGN="CENTER">IANA
275  * </TD>
276  * <TD WIDTH="31%">
277  * <P ALIGN="CENTER">cp284
278  * </TD>
279  * </TR>
280  * <TR>
281  * <TD WIDTH="33%">EBCDIC: Great Britain</TD>
282  * <TD WIDTH="15%">
283  * <P ALIGN="CENTER">ebcdic-cp-gb
284  * </TD>
285  * <TD WIDTH="12%">
286  * <P ALIGN="CENTER">IANA
287  * </TD>
288  * <TD WIDTH="31%">
289  * <P ALIGN="CENTER">cp285
290  * </TD>
291  * </TR>
292  * <TR>
293  * <TD WIDTH="33%">EBCDIC: France</TD>
294  * <TD WIDTH="15%">
295  * <P ALIGN="CENTER">ebcdic-cp-fr
296  * </TD>
297  * <TD WIDTH="12%">
298  * <P ALIGN="CENTER">IANA
299  * </TD>
300  * <TD WIDTH="31%">
301  * <P ALIGN="CENTER">cp297
302  * </TD>
303  * </TR>
304  * <TR>
305  * <TD WIDTH="33%">EBCDIC: Arabic</TD>
306  * <TD WIDTH="15%">
307  * <P ALIGN="CENTER">ebcdic-cp-ar1
308  * </TD>
309  * <TD WIDTH="12%">
310  * <P ALIGN="CENTER">IANA
311  * </TD>
312  * <TD WIDTH="31%">
313  * <P ALIGN="CENTER">cp420
314  * </TD>
315  * </TR>
316  * <TR>
317  * <TD WIDTH="33%">EBCDIC: Hebrew</TD>
318  * <TD WIDTH="15%">
319  * <P ALIGN="CENTER">ebcdic-cp-he
320  * </TD>
321  * <TD WIDTH="12%">
322  * <P ALIGN="CENTER">IANA
323  * </TD>
324  * <TD WIDTH="31%">
325  * <P ALIGN="CENTER">cp424
326  * </TD>
327  * </TR>
328  * <TR>
329  * <TD WIDTH="33%">EBCDIC: Switzerland</TD>
330  * <TD WIDTH="15%">
331  * <P ALIGN="CENTER">ebcdic-cp-ch
332  * </TD>
333  * <TD WIDTH="12%">
334  * <P ALIGN="CENTER">IANA
335  * </TD>
336  * <TD WIDTH="31%">
337  * <P ALIGN="CENTER">cp500
338  * </TD>
339  * </TR>
340  * <TR>
341  * <TD WIDTH="33%">EBCDIC: Roece</TD>
342  * <TD WIDTH="15%">
343  * <P ALIGN="CENTER">ebcdic-cp-roece
344  * </TD>
345  * <TD WIDTH="12%">
346  * <P ALIGN="CENTER">IANA
347  * </TD>
348  * <TD WIDTH="31%">
349  * <P ALIGN="CENTER">cp870
350  * </TD>
351  * </TR>
352  * <TR>
353  * <TD WIDTH="33%">EBCDIC: Yugoslavia</TD>
354  * <TD WIDTH="15%">
355  * <P ALIGN="CENTER">ebcdic-cp-yu
356  * </TD>
357  * <TD WIDTH="12%">
358  * <P ALIGN="CENTER">IANA
359  * </TD>
360  * <TD WIDTH="31%">
361  * <P ALIGN="CENTER">cp870
362  * </TD>
363  * </TR>
364  * <TR>
365  * <TD WIDTH="33%">EBCDIC: Iceland</TD>
366  * <TD WIDTH="15%">
367  * <P ALIGN="CENTER">ebcdic-cp-is
368  * </TD>
369  * <TD WIDTH="12%">
370  * <P ALIGN="CENTER">IANA
371  * </TD>
372  * <TD WIDTH="31%">
373  * <P ALIGN="CENTER">cp871
374  * </TD>
375  * </TR>
376  * <TR>
377  * <TD WIDTH="33%">EBCDIC: Urdu</TD>
378  * <TD WIDTH="15%">
379  * <P ALIGN="CENTER">ebcdic-cp-ar2
380  * </TD>
381  * <TD WIDTH="12%">
382  * <P ALIGN="CENTER">IANA
383  * </TD>
384  * <TD WIDTH="31%">
385  * <P ALIGN="CENTER">cp918
386  * </TD>
387  * </TR>
388  * <TR>
389  * <TD WIDTH="33%">Chinese for PRC, mixed 1/2 byte</TD>
390  * <TD WIDTH="15%">
391  * <P ALIGN="CENTER">gb2312
392  * </TD>
393  * <TD WIDTH="12%">
394  * <P ALIGN="CENTER">MIME
395  * </TD>
396  * <TD WIDTH="31%">
397  * <P ALIGN="CENTER">GB2312
398  * </TD>
399  * </TR>
400  * <TR>
401  * <TD WIDTH="33%">Extended Unix Code, packed for Japanese</TD>
402  * <TD WIDTH="15%">
403  * <P ALIGN="CENTER">euc-jp
404  * </TD>
405  * <TD WIDTH="12%">
406  * <P ALIGN="CENTER">MIME
407  * </TD>
408  * <TD WIDTH="31%">
409  * <P ALIGN="CENTER">eucjis
410  * </TD>
411  * </TR>
412  * <TR>
413  * <TD WIDTH="33%">Japanese: iso-2022-jp</TD>
414  * <TD WIDTH="15%">
415  * <P ALIGN="CENTER">iso-2020-jp
416  * </TD>
417  * <TD WIDTH="12%">
418  * <P ALIGN="CENTER">MIME
419  * </TD>
420  * <TD WIDTH="31%">
421  * <P ALIGN="CENTER">JIS
422  * </TD>
423  * </TR>
424  * <TR>
425  * <TD WIDTH="33%">Japanese: Shift JIS</TD>
426  * <TD WIDTH="15%">
427  * <P ALIGN="CENTER">Shift_JIS
428  * </TD>
429  * <TD WIDTH="12%">
430  * <P ALIGN="CENTER">MIME
431  * </TD>
432  * <TD WIDTH="31%">
433  * <P ALIGN="CENTER">SJIS
434  * </TD>
435  * </TR>
436  * <TR>
437  * <TD WIDTH="33%">Chinese: Big5</TD>
438  * <TD WIDTH="15%">
439  * <P ALIGN="CENTER">Big5
440  * </TD>
441  * <TD WIDTH="12%">
442  * <P ALIGN="CENTER">MIME
443  * </TD>
444  * <TD WIDTH="31%">
445  * <P ALIGN="CENTER">Big5
446  * </TD>
447  * </TR>
448  * <TR>
449  * <TD WIDTH="33%">Extended Unix Code, packed for Korean</TD>
450  * <TD WIDTH="15%">
451  * <P ALIGN="CENTER">euc-kr
452  * </TD>
453  * <TD WIDTH="12%">
454  * <P ALIGN="CENTER">MIME
455  * </TD>
456  * <TD WIDTH="31%">
457  * <P ALIGN="CENTER">iso2022kr
458  * </TD>
459  * </TR>
460  * <TR>
461  * <TD WIDTH="33%">Cyrillic</TD>
462  * <TD WIDTH="15%">
463  * <P ALIGN="CENTER">koi8-r
464  * </TD>
465  * <TD WIDTH="12%">
466  * <P ALIGN="CENTER">MIME
467  * </TD>
468  * <TD WIDTH="31%">
469  * <P ALIGN="CENTER">koi8-r
470  * </TD>
471  * </TR>
472  * </TABLE>
473  *
474  * @author TAMURA Kent, IBM
475  * @author Andy Clark, IBM
476  *
477  * @version $Id: EncodingMap.java 467222 2006-10-24 03:17:11Z markt $
478  */

479 public class EncodingMap {
480
481     //
482
// Data
483
//
484

485     /** fIANA2JavaMap */
486     protected final static Hashtable JavaDoc fIANA2JavaMap = new Hashtable JavaDoc();
487
488     /** fJava2IANAMap */
489     protected final static Hashtable JavaDoc fJava2IANAMap = new Hashtable JavaDoc();
490
491     //
492
// Static initialization
493
//
494

495     static {
496
497         // add IANA to Java encoding mappings.
498
fIANA2JavaMap.put("BIG5", "Big5");
499         fIANA2JavaMap.put("CSBIG5", "Big5");
500         fIANA2JavaMap.put("CP037", "CP037");
501         fIANA2JavaMap.put("IBM037", "CP037");
502         fIANA2JavaMap.put("CSIBM037", "CP037");
503         fIANA2JavaMap.put("EBCDIC-CP-US", "CP037");
504         fIANA2JavaMap.put("EBCDIC-CP-CA", "CP037");
505         fIANA2JavaMap.put("EBCDIC-CP-NL", "CP037");
506         fIANA2JavaMap.put("EBCDIC-CP-WT", "CP037");
507         fIANA2JavaMap.put("IBM273", "CP273");
508         fIANA2JavaMap.put("CP273", "CP273");
509         fIANA2JavaMap.put("CSIBM273", "CP273");
510         fIANA2JavaMap.put("IBM277", "CP277");
511         fIANA2JavaMap.put("CP277", "CP277");
512         fIANA2JavaMap.put("CSIBM277", "CP277");
513         fIANA2JavaMap.put("EBCDIC-CP-DK", "CP277");
514         fIANA2JavaMap.put("EBCDIC-CP-NO", "CP277");
515         fIANA2JavaMap.put("IBM278", "CP278");
516         fIANA2JavaMap.put("CP278", "CP278");
517         fIANA2JavaMap.put("CSIBM278", "CP278");
518         fIANA2JavaMap.put("EBCDIC-CP-FI", "CP278");
519         fIANA2JavaMap.put("EBCDIC-CP-SE", "CP278");
520         fIANA2JavaMap.put("IBM280", "CP280");
521         fIANA2JavaMap.put("CP280", "CP280");
522         fIANA2JavaMap.put("CSIBM280", "CP280");
523         fIANA2JavaMap.put("EBCDIC-CP-IT", "CP280");
524         fIANA2JavaMap.put("IBM284", "CP284");
525         fIANA2JavaMap.put("CP284", "CP284");
526         fIANA2JavaMap.put("CSIBM284", "CP284");
527         fIANA2JavaMap.put("EBCDIC-CP-ES", "CP284");
528         fIANA2JavaMap.put("EBCDIC-CP-GB", "CP285");
529         fIANA2JavaMap.put("IBM285", "CP285");
530         fIANA2JavaMap.put("CP285", "CP285");
531         fIANA2JavaMap.put("CSIBM285", "CP285");
532         fIANA2JavaMap.put("EBCDIC-JP-KANA", "CP290");
533         fIANA2JavaMap.put("IBM290", "CP290");
534         fIANA2JavaMap.put("CP290", "CP290");
535         fIANA2JavaMap.put("CSIBM290", "CP290");
536         fIANA2JavaMap.put("EBCDIC-CP-FR", "CP297");
537         fIANA2JavaMap.put("IBM297", "CP297");
538         fIANA2JavaMap.put("CP297", "CP297");
539         fIANA2JavaMap.put("CSIBM297", "CP297");
540         fIANA2JavaMap.put("EBCDIC-CP-AR1", "CP420");
541         fIANA2JavaMap.put("IBM420", "CP420");
542         fIANA2JavaMap.put("CP420", "CP420");
543         fIANA2JavaMap.put("CSIBM420", "CP420");
544         fIANA2JavaMap.put("EBCDIC-CP-HE", "CP424");
545         fIANA2JavaMap.put("IBM424", "CP424");
546         fIANA2JavaMap.put("CP424", "CP424");
547         fIANA2JavaMap.put("CSIBM424", "CP424");
548         fIANA2JavaMap.put("IBM437", "CP437");
549         fIANA2JavaMap.put("437", "CP437");
550         fIANA2JavaMap.put("CP437", "CP437");
551         fIANA2JavaMap.put("CSPC8CODEPAGE437", "CP437");
552         fIANA2JavaMap.put("EBCDIC-CP-CH", "CP500");
553         fIANA2JavaMap.put("IBM500", "CP500");
554         fIANA2JavaMap.put("CP500", "CP500");
555         fIANA2JavaMap.put("CSIBM500", "CP500");
556         fIANA2JavaMap.put("EBCDIC-CP-CH", "CP500");
557         fIANA2JavaMap.put("EBCDIC-CP-BE", "CP500");
558         fIANA2JavaMap.put("IBM775", "CP775");
559         fIANA2JavaMap.put("CP775", "CP775");
560         fIANA2JavaMap.put("CSPC775BALTIC", "CP775");
561         fIANA2JavaMap.put("IBM850", "CP850");
562         fIANA2JavaMap.put("850", "CP850");
563         fIANA2JavaMap.put("CP850", "CP850");
564         fIANA2JavaMap.put("CSPC850MULTILINGUAL", "CP850");
565         fIANA2JavaMap.put("IBM852", "CP852");
566         fIANA2JavaMap.put("852", "CP852");
567         fIANA2JavaMap.put("CP852", "CP852");
568         fIANA2JavaMap.put("CSPCP852", "CP852");
569         fIANA2JavaMap.put("IBM855", "CP855");
570         fIANA2JavaMap.put("855", "CP855");
571         fIANA2JavaMap.put("CP855", "CP855");
572         fIANA2JavaMap.put("CSIBM855", "CP855");
573         fIANA2JavaMap.put("IBM857", "CP857");
574         fIANA2JavaMap.put("857", "CP857");
575         fIANA2JavaMap.put("CP857", "CP857");
576         fIANA2JavaMap.put("CSIBM857", "CP857");
577         fIANA2JavaMap.put("IBM00858", "CP858");
578         fIANA2JavaMap.put("CP00858", "CP858");
579         fIANA2JavaMap.put("CCSID00858", "CP858");
580         fIANA2JavaMap.put("IBM860", "CP860");
581         fIANA2JavaMap.put("860", "CP860");
582         fIANA2JavaMap.put("CP860", "CP860");
583         fIANA2JavaMap.put("CSIBM860", "CP860");
584         fIANA2JavaMap.put("IBM861", "CP861");
585         fIANA2JavaMap.put("861", "CP861");
586         fIANA2JavaMap.put("CP861", "CP861");
587         fIANA2JavaMap.put("CP-IS", "CP861");
588         fIANA2JavaMap.put("CSIBM861", "CP861");
589         fIANA2JavaMap.put("IBM862", "CP862");
590         fIANA2JavaMap.put("862", "CP862");
591         fIANA2JavaMap.put("CP862", "CP862");
592         fIANA2JavaMap.put("CSPC862LATINHEBREW", "CP862");
593         fIANA2JavaMap.put("IBM863", "CP863");
594         fIANA2JavaMap.put("863", "CP863");
595         fIANA2JavaMap.put("CP863", "CP863");
596         fIANA2JavaMap.put("CSIBM863", "CP863");
597         fIANA2JavaMap.put("IBM864", "CP864");
598         fIANA2JavaMap.put("CP864", "CP864");
599         fIANA2JavaMap.put("CSIBM864", "CP864");
600         fIANA2JavaMap.put("IBM865", "CP865");
601         fIANA2JavaMap.put("865", "CP865");
602         fIANA2JavaMap.put("CP865", "CP865");
603         fIANA2JavaMap.put("CSIBM865", "CP865");
604         fIANA2JavaMap.put("IBM866", "CP866");
605         fIANA2JavaMap.put("866", "CP866");
606         fIANA2JavaMap.put("CP866", "CP866");
607         fIANA2JavaMap.put("CSIBM866", "CP866");
608         fIANA2JavaMap.put("IBM868", "CP868");
609         fIANA2JavaMap.put("CP868", "CP868");
610         fIANA2JavaMap.put("CSIBM868", "CP868");
611         fIANA2JavaMap.put("CP-AR", "CP868");
612         fIANA2JavaMap.put("IBM869", "CP869");
613         fIANA2JavaMap.put("CP869", "CP869");
614         fIANA2JavaMap.put("CSIBM869", "CP869");
615         fIANA2JavaMap.put("CP-GR", "CP869");
616         fIANA2JavaMap.put("IBM870", "CP870");
617         fIANA2JavaMap.put("CP870", "CP870");
618         fIANA2JavaMap.put("CSIBM870", "CP870");
619         fIANA2JavaMap.put("EBCDIC-CP-ROECE", "CP870");
620         fIANA2JavaMap.put("EBCDIC-CP-YU", "CP870");
621         fIANA2JavaMap.put("IBM871", "CP871");
622         fIANA2JavaMap.put("CP871", "CP871");
623         fIANA2JavaMap.put("CSIBM871", "CP871");
624         fIANA2JavaMap.put("EBCDIC-CP-IS", "CP871");
625         fIANA2JavaMap.put("IBM918", "CP918");
626         fIANA2JavaMap.put("CP918", "CP918");
627         fIANA2JavaMap.put("CSIBM918", "CP918");
628         fIANA2JavaMap.put("EBCDIC-CP-AR2", "CP918");
629         fIANA2JavaMap.put("IBM00924", "CP924");
630         fIANA2JavaMap.put("CP00924", "CP924");
631         fIANA2JavaMap.put("CCSID00924", "CP924");
632         // is this an error???
633
fIANA2JavaMap.put("EBCDIC-LATIN9--EURO", "CP924");
634         fIANA2JavaMap.put("IBM1026", "CP1026");
635         fIANA2JavaMap.put("CP1026", "CP1026");
636         fIANA2JavaMap.put("CSIBM1026", "CP1026");
637         fIANA2JavaMap.put("IBM01140", "Cp1140");
638         fIANA2JavaMap.put("CP01140", "Cp1140");
639         fIANA2JavaMap.put("CCSID01140", "Cp1140");
640         fIANA2JavaMap.put("IBM01141", "Cp1141");
641         fIANA2JavaMap.put("CP01141", "Cp1141");
642         fIANA2JavaMap.put("CCSID01141", "Cp1141");
643         fIANA2JavaMap.put("IBM01142", "Cp1142");
644         fIANA2JavaMap.put("CP01142", "Cp1142");
645         fIANA2JavaMap.put("CCSID01142", "Cp1142");
646         fIANA2JavaMap.put("IBM01143", "Cp1143");
647         fIANA2JavaMap.put("CP01143", "Cp1143");
648         fIANA2JavaMap.put("CCSID01143", "Cp1143");
649         fIANA2JavaMap.put("IBM01144", "Cp1144");
650         fIANA2JavaMap.put("CP01144", "Cp1144");
651         fIANA2JavaMap.put("CCSID01144", "Cp1144");
652         fIANA2JavaMap.put("IBM01145", "Cp1145");
653         fIANA2JavaMap.put("CP01145", "Cp1145");
654         fIANA2JavaMap.put("CCSID01145", "Cp1145");
655         fIANA2JavaMap.put("IBM01146", "Cp1146");
656         fIANA2JavaMap.put("CP01146", "Cp1146");
657         fIANA2JavaMap.put("CCSID01146", "Cp1146");
658         fIANA2JavaMap.put("IBM01147", "Cp1147");
659         fIANA2JavaMap.put("CP01147", "Cp1147");
660         fIANA2JavaMap.put("CCSID01147", "Cp1147");
661         fIANA2JavaMap.put("IBM01148", "Cp1148");
662         fIANA2JavaMap.put("CP01148", "Cp1148");
663         fIANA2JavaMap.put("CCSID01148", "Cp1148");
664         fIANA2JavaMap.put("IBM01149", "Cp1149");
665         fIANA2JavaMap.put("CP01149", "Cp1149");
666         fIANA2JavaMap.put("CCSID01149", "Cp1149");
667         fIANA2JavaMap.put("EUC-JP", "EUCJIS");
668         fIANA2JavaMap.put("CSEUCPKDFMTJAPANESE", "EUCJIS");
669         fIANA2JavaMap.put("EXTENDED_UNIX_CODE_PACKED_FORMAT_FOR_JAPANESE", "EUCJIS");
670         fIANA2JavaMap.put("EUC-KR", "KSC5601");
671         fIANA2JavaMap.put("CSEUCKR", "KSC5601");
672         fIANA2JavaMap.put("KS_C_5601-1987", "KS_C_5601-1987");
673         fIANA2JavaMap.put("ISO-IR-149", "KS_C_5601-1987");
674         fIANA2JavaMap.put("KS_C_5601-1989", "KS_C_5601-1987");
675         fIANA2JavaMap.put("KSC_5601", "KS_C_5601-1987");
676         fIANA2JavaMap.put("KOREAN", "KS_C_5601-1987");
677         fIANA2JavaMap.put("CSKSC56011987", "KS_C_5601-1987");
678         fIANA2JavaMap.put("GB2312", "GB2312");
679         fIANA2JavaMap.put("CSGB2312", "GB2312");
680         fIANA2JavaMap.put("ISO-2022-JP", "JIS");
681         fIANA2JavaMap.put("CSISO2022JP", "JIS");
682         fIANA2JavaMap.put("ISO-2022-KR", "ISO2022KR");
683         fIANA2JavaMap.put("CSISO2022KR", "ISO2022KR");
684         fIANA2JavaMap.put("ISO-2022-CN", "ISO2022CN");
685
686         fIANA2JavaMap.put("X0201", "JIS0201");
687         fIANA2JavaMap.put("CSISO13JISC6220JP", "JIS0201");
688         fIANA2JavaMap.put("X0208", "JIS0208");
689         fIANA2JavaMap.put("ISO-IR-87", "JIS0208");
690         fIANA2JavaMap.put("X0208dbiJIS_X0208-1983", "JIS0208");
691         fIANA2JavaMap.put("CSISO87JISX0208", "JIS0208");
692         fIANA2JavaMap.put("X0212", "JIS0212");
693         fIANA2JavaMap.put("ISO-IR-159", "JIS0212");
694         fIANA2JavaMap.put("CSISO159JISX02121990", "JIS0212");
695         fIANA2JavaMap.put("GB18030", "GB18030");
696         fIANA2JavaMap.put("GBK", "GBK");
697         fIANA2JavaMap.put("CP936", "GBK");
698         fIANA2JavaMap.put("MS936", "GBK");
699         fIANA2JavaMap.put("WINDOWS-936", "GBK");
700         fIANA2JavaMap.put("SHIFT_JIS", "SJIS");
701         fIANA2JavaMap.put("CSSHIFTJIS", "SJIS");
702         fIANA2JavaMap.put("MS_KANJI", "SJIS");
703         fIANA2JavaMap.put("WINDOWS-31J", "MS932");
704         fIANA2JavaMap.put("CSWINDOWS31J", "MS932");
705
706         // Add support for Cp1252 and its friends
707
fIANA2JavaMap.put("WINDOWS-1250", "Cp1250");
708         fIANA2JavaMap.put("WINDOWS-1251", "Cp1251");
709         fIANA2JavaMap.put("WINDOWS-1252", "Cp1252");
710         fIANA2JavaMap.put("WINDOWS-1253", "Cp1253");
711         fIANA2JavaMap.put("WINDOWS-1254", "Cp1254");
712         fIANA2JavaMap.put("WINDOWS-1255", "Cp1255");
713         fIANA2JavaMap.put("WINDOWS-1256", "Cp1256");
714         fIANA2JavaMap.put("WINDOWS-1257", "Cp1257");
715         fIANA2JavaMap.put("WINDOWS-1258", "Cp1258");
716         fIANA2JavaMap.put("TIS-620", "TIS620");
717
718         fIANA2JavaMap.put("ISO-8859-1", "ISO8859_1");
719         fIANA2JavaMap.put("ISO-IR-100", "ISO8859_1");
720         fIANA2JavaMap.put("ISO_8859-1", "ISO8859_1");
721         fIANA2JavaMap.put("LATIN1", "ISO8859_1");
722         fIANA2JavaMap.put("CSISOLATIN1", "ISO8859_1");
723         fIANA2JavaMap.put("L1", "ISO8859_1");
724         fIANA2JavaMap.put("IBM819", "ISO8859_1");
725         fIANA2JavaMap.put("CP819", "ISO8859_1");
726
727         fIANA2JavaMap.put("ISO-8859-2", "ISO8859_2");
728         fIANA2JavaMap.put("ISO-IR-101", "ISO8859_2");
729         fIANA2JavaMap.put("ISO_8859-2", "ISO8859_2");
730         fIANA2JavaMap.put("LATIN2", "ISO8859_2");
731         fIANA2JavaMap.put("CSISOLATIN2", "ISO8859_2");
732         fIANA2JavaMap.put("L2", "ISO8859_2");
733
734         fIANA2JavaMap.put("ISO-8859-3", "ISO8859_3");
735         fIANA2JavaMap.put("ISO-IR-109", "ISO8859_3");
736         fIANA2JavaMap.put("ISO_8859-3", "ISO8859_3");
737         fIANA2JavaMap.put("LATIN3", "ISO8859_3");
738         fIANA2JavaMap.put("CSISOLATIN3", "ISO8859_3");
739         fIANA2JavaMap.put("L3", "ISO8859_3");
740
741         fIANA2JavaMap.put("ISO-8859-4", "ISO8859_4");
742         fIANA2JavaMap.put("ISO-IR-110", "ISO8859_4");
743         fIANA2JavaMap.put("ISO_8859-4", "ISO8859_4");
744         fIANA2JavaMap.put("LATIN4", "ISO8859_4");
745         fIANA2JavaMap.put("CSISOLATIN4", "ISO8859_4");
746         fIANA2JavaMap.put("L4", "ISO8859_4");
747
748         fIANA2JavaMap.put("ISO-8859-5", "ISO8859_5");
749         fIANA2JavaMap.put("ISO-IR-144", "ISO8859_5");
750         fIANA2JavaMap.put("ISO_8859-5", "ISO8859_5");
751         fIANA2JavaMap.put("CYRILLIC", "ISO8859_5");
752         fIANA2JavaMap.put("CSISOLATINCYRILLIC", "ISO8859_5");
753
754         fIANA2JavaMap.put("ISO-8859-6", "ISO8859_6");
755         fIANA2JavaMap.put("ISO-IR-127", "ISO8859_6");
756         fIANA2JavaMap.put("ISO_8859-6", "ISO8859_6");
757         fIANA2JavaMap.put("ECMA-114", "ISO8859_6");
758         fIANA2JavaMap.put("ASMO-708", "ISO8859_6");
759         fIANA2JavaMap.put("ARABIC", "ISO8859_6");
760         fIANA2JavaMap.put("CSISOLATINARABIC", "ISO8859_6");
761
762         fIANA2JavaMap.put("ISO-8859-7", "ISO8859_7");
763         fIANA2JavaMap.put("ISO-IR-126", "ISO8859_7");
764         fIANA2JavaMap.put("ISO_8859-7", "ISO8859_7");
765         fIANA2JavaMap.put("ELOT_928", "ISO8859_7");
766         fIANA2JavaMap.put("ECMA-118", "ISO8859_7");
767         fIANA2JavaMap.put("GREEK", "ISO8859_7");
768         fIANA2JavaMap.put("CSISOLATINGREEK", "ISO8859_7");
769         fIANA2JavaMap.put("GREEK8", "ISO8859_7");
770
771         fIANA2JavaMap.put("ISO-8859-8", "ISO8859_8");
772         fIANA2JavaMap.put("ISO-8859-8-I", "ISO8859_8"); // added since this encoding only differs w.r.t. presentation
773
fIANA2JavaMap.put("ISO-IR-138", "ISO8859_8");
774         fIANA2JavaMap.put("ISO_8859-8", "ISO8859_8");
775         fIANA2JavaMap.put("HEBREW", "ISO8859_8");
776         fIANA2JavaMap.put("CSISOLATINHEBREW", "ISO8859_8");
777
778         fIANA2JavaMap.put("ISO-8859-9", "ISO8859_9");
779         fIANA2JavaMap.put("ISO-IR-148", "ISO8859_9");
780         fIANA2JavaMap.put("ISO_8859-9", "ISO8859_9");
781         fIANA2JavaMap.put("LATIN5", "ISO8859_9");
782         fIANA2JavaMap.put("CSISOLATIN5", "ISO8859_9");
783         fIANA2JavaMap.put("L5", "ISO8859_9");
784
785         fIANA2JavaMap.put("ISO-8859-13", "ISO8859_13");
786         
787         fIANA2JavaMap.put("ISO-8859-15", "ISO8859_15_FDIS");
788         fIANA2JavaMap.put("ISO_8859-15", "ISO8859_15_FDIS");
789         fIANA2JavaMap.put("LATIN-9", "ISO8859_15_FDIS");
790
791         fIANA2JavaMap.put("KOI8-R", "KOI8_R");
792         fIANA2JavaMap.put("CSKOI8R", "KOI8_R");
793         fIANA2JavaMap.put("US-ASCII", "ASCII");
794         fIANA2JavaMap.put("ISO-IR-6", "ASCII");
795         fIANA2JavaMap.put("ANSI_X3.4-1968", "ASCII");
796         fIANA2JavaMap.put("ANSI_X3.4-1986", "ASCII");
797         fIANA2JavaMap.put("ISO_646.IRV:1991", "ASCII");
798         fIANA2JavaMap.put("ASCII", "ASCII");
799         fIANA2JavaMap.put("CSASCII", "ASCII");
800         fIANA2JavaMap.put("ISO646-US", "ASCII");
801         fIANA2JavaMap.put("US", "ASCII");
802         fIANA2JavaMap.put("IBM367", "ASCII");
803         fIANA2JavaMap.put("CP367", "ASCII");
804         fIANA2JavaMap.put("UTF-8", "UTF8");
805         fIANA2JavaMap.put("UTF-16", "UTF-16");
806         fIANA2JavaMap.put("UTF-16BE", "UnicodeBig");
807         fIANA2JavaMap.put("UTF-16LE", "UnicodeLittle");
808
809         // support for 1047, as proposed to be added to the
810
// IANA registry in
811
// http://lists.w3.org/Archives/Public/ietf-charset/2002JulSep/0049.html
812
fIANA2JavaMap.put("IBM-1047", "Cp1047");
813         fIANA2JavaMap.put("IBM1047", "Cp1047");
814         fIANA2JavaMap.put("CP1047", "Cp1047");
815
816         // Adding new aliases as proposed in
817
// http://lists.w3.org/Archives/Public/ietf-charset/2002JulSep/0058.html
818
fIANA2JavaMap.put("IBM-37", "CP037");
819         fIANA2JavaMap.put("IBM-273", "CP273");
820         fIANA2JavaMap.put("IBM-277", "CP277");
821         fIANA2JavaMap.put("IBM-278", "CP278");
822         fIANA2JavaMap.put("IBM-280", "CP280");
823         fIANA2JavaMap.put("IBM-284", "CP284");
824         fIANA2JavaMap.put("IBM-285", "CP285");
825         fIANA2JavaMap.put("IBM-290", "CP290");
826         fIANA2JavaMap.put("IBM-297", "CP297");
827         fIANA2JavaMap.put("IBM-420", "CP420");
828         fIANA2JavaMap.put("IBM-424", "CP424");
829         fIANA2JavaMap.put("IBM-437", "CP437");
830         fIANA2JavaMap.put("IBM-500", "CP500");
831         fIANA2JavaMap.put("IBM-775", "CP775");
832         fIANA2JavaMap.put("IBM-850", "CP850");
833         fIANA2JavaMap.put("IBM-852", "CP852");
834         fIANA2JavaMap.put("IBM-855", "CP855");
835         fIANA2JavaMap.put("IBM-857", "CP857");
836         fIANA2JavaMap.put("IBM-858", "CP858");
837         fIANA2JavaMap.put("IBM-860", "CP860");
838         fIANA2JavaMap.put("IBM-861", "CP861");
839         fIANA2JavaMap.put("IBM-862", "CP862");
840         fIANA2JavaMap.put("IBM-863", "CP863");
841         fIANA2JavaMap.put("IBM-864", "CP864");
842         fIANA2JavaMap.put("IBM-865", "CP865");
843         fIANA2JavaMap.put("IBM-866", "CP866");
844         fIANA2JavaMap.put("IBM-868", "CP868");
845         fIANA2JavaMap.put("IBM-869", "CP869");
846         fIANA2JavaMap.put("IBM-870", "CP870");
847         fIANA2JavaMap.put("IBM-871", "CP871");
848         fIANA2JavaMap.put("IBM-918", "CP918");
849         fIANA2JavaMap.put("IBM-924", "CP924");
850         fIANA2JavaMap.put("IBM-1026", "CP1026");
851         fIANA2JavaMap.put("IBM-1140", "Cp1140");
852         fIANA2JavaMap.put("IBM-1141", "Cp1141");
853         fIANA2JavaMap.put("IBM-1142", "Cp1142");
854         fIANA2JavaMap.put("IBM-1143", "Cp1143");
855         fIANA2JavaMap.put("IBM-1144", "Cp1144");
856         fIANA2JavaMap.put("IBM-1145", "Cp1145");
857         fIANA2JavaMap.put("IBM-1146", "Cp1146");
858         fIANA2JavaMap.put("IBM-1147", "Cp1147");
859         fIANA2JavaMap.put("IBM-1148", "Cp1148");
860         fIANA2JavaMap.put("IBM-1149", "Cp1149");
861         fIANA2JavaMap.put("IBM-819", "ISO8859_1");
862         fIANA2JavaMap.put("IBM-367", "ASCII");
863
864         // REVISIT:
865
// j:CNS11643 -> EUC-TW?
866
// ISO-2022-CN? ISO-2022-CN-EXT?
867

868         // add Java to IANA encoding mappings
869
//fJava2IANAMap.put("8859_1", "US-ASCII"); // ?
870
fJava2IANAMap.put("ISO8859_1", "ISO-8859-1");
871         fJava2IANAMap.put("ISO8859_2", "ISO-8859-2");
872         fJava2IANAMap.put("ISO8859_3", "ISO-8859-3");
873         fJava2IANAMap.put("ISO8859_4", "ISO-8859-4");
874         fJava2IANAMap.put("ISO8859_5", "ISO-8859-5");
875         fJava2IANAMap.put("ISO8859_6", "ISO-8859-6");
876         fJava2IANAMap.put("ISO8859_7", "ISO-8859-7");
877         fJava2IANAMap.put("ISO8859_8", "ISO-8859-8");
878         fJava2IANAMap.put("ISO8859_9", "ISO-8859-9");
879         fJava2IANAMap.put("ISO8859_13", "ISO-8859-13");
880         fJava2IANAMap.put("ISO8859_15", "ISO-8859-15");
881         fJava2IANAMap.put("ISO8859_15_FDIS", "ISO-8859-15");
882         fJava2IANAMap.put("Big5", "BIG5");
883         fJava2IANAMap.put("CP037", "EBCDIC-CP-US");
884         fJava2IANAMap.put("CP273", "IBM273");
885         fJava2IANAMap.put("CP277", "EBCDIC-CP-DK");
886         fJava2IANAMap.put("CP278", "EBCDIC-CP-FI");
887         fJava2IANAMap.put("CP280", "EBCDIC-CP-IT");
888         fJava2IANAMap.put("CP284", "EBCDIC-CP-ES");
889         fJava2IANAMap.put("CP285", "EBCDIC-CP-GB");
890         fJava2IANAMap.put("CP290", "EBCDIC-JP-KANA");
891         fJava2IANAMap.put("CP297", "EBCDIC-CP-FR");
892         fJava2IANAMap.put("CP420", "EBCDIC-CP-AR1");
893         fJava2IANAMap.put("CP424", "EBCDIC-CP-HE");
894         fJava2IANAMap.put("CP437", "IBM437");
895         fJava2IANAMap.put("CP500", "EBCDIC-CP-CH");
896         fJava2IANAMap.put("CP775", "IBM775");
897         fJava2IANAMap.put("CP850", "IBM850");
898         fJava2IANAMap.put("CP852", "IBM852");
899         fJava2IANAMap.put("CP855", "IBM855");
900         fJava2IANAMap.put("CP857", "IBM857");
901         fJava2IANAMap.put("CP858", "IBM00858");
902         fJava2IANAMap.put("CP860", "IBM860");
903         fJava2IANAMap.put("CP861", "IBM861");
904         fJava2IANAMap.put("CP862", "IBM862");
905         fJava2IANAMap.put("CP863", "IBM863");
906         fJava2IANAMap.put("CP864", "IBM864");
907         fJava2IANAMap.put("CP865", "IBM865");
908         fJava2IANAMap.put("CP866", "IBM866");
909         fJava2IANAMap.put("CP868", "IBM868");
910         fJava2IANAMap.put("CP869", "IBM869");
911         fJava2IANAMap.put("CP870", "EBCDIC-CP-ROECE");
912         fJava2IANAMap.put("CP871", "EBCDIC-CP-IS");
913         fJava2IANAMap.put("CP918", "EBCDIC-CP-AR2");
914         fJava2IANAMap.put("CP924", "IBM00924");
915         fJava2IANAMap.put("CP1026", "IBM1026");
916         fJava2IANAMap.put("Cp01140", "IBM01140");
917         fJava2IANAMap.put("Cp01141", "IBM01141");
918         fJava2IANAMap.put("Cp01142", "IBM01142");
919         fJava2IANAMap.put("Cp01143", "IBM01143");
920         fJava2IANAMap.put("Cp01144", "IBM01144");
921         fJava2IANAMap.put("Cp01145", "IBM01145");
922         fJava2IANAMap.put("Cp01146", "IBM01146");
923         fJava2IANAMap.put("Cp01147", "IBM01147");
924         fJava2IANAMap.put("Cp01148", "IBM01148");
925         fJava2IANAMap.put("Cp01149", "IBM01149");
926         fJava2IANAMap.put("EUCJIS", "EUC-JP");
927         fJava2IANAMap.put("KS_C_5601-1987", "KS_C_5601-1987");
928         fJava2IANAMap.put("GB2312", "GB2312");
929         fJava2IANAMap.put("ISO2022KR", "ISO-2022-KR");
930         fJava2IANAMap.put("ISO2022CN", "ISO-2022-CN");
931         fJava2IANAMap.put("JIS", "ISO-2022-JP");
932         fJava2IANAMap.put("KOI8_R", "KOI8-R");
933         fJava2IANAMap.put("KSC5601", "EUC-KR");
934         fJava2IANAMap.put("GB18030", "GB18030");
935         fJava2IANAMap.put("GBK", "GBK");
936         fJava2IANAMap.put("SJIS", "SHIFT_JIS");
937         fJava2IANAMap.put("MS932", "WINDOWS-31J");
938         fJava2IANAMap.put("UTF8", "UTF-8");
939         fJava2IANAMap.put("Unicode", "UTF-16");
940         fJava2IANAMap.put("UnicodeBig", "UTF-16BE");
941         fJava2IANAMap.put("UnicodeLittle", "UTF-16LE");
942         fJava2IANAMap.put("JIS0201", "X0201");
943         fJava2IANAMap.put("JIS0208", "X0208");
944         fJava2IANAMap.put("JIS0212", "ISO-IR-159");
945
946         // proposed addition (see above for details):
947
fJava2IANAMap.put("CP1047", "IBM1047");
948
949     } // <clinit>()
950

951     //
952
// Constructors
953
//
954

955     /** Default constructor. */
956     public EncodingMap() {}
957
958     //
959
// Public static methods
960
//
961

962     /**
963      * Adds an IANA to Java encoding name mapping.
964      *
965      * @param ianaEncoding The IANA encoding name.
966      * @param javaEncoding The Java encoding name.
967      */

968     public static void putIANA2JavaMapping(String JavaDoc ianaEncoding,
969                                            String JavaDoc javaEncoding) {
970         fIANA2JavaMap.put(ianaEncoding, javaEncoding);
971     } // putIANA2JavaMapping(String,String)
972

973     /**
974      * Returns the Java encoding name for the specified IANA encoding name.
975      *
976      * @param ianaEncoding The IANA encoding name.
977      */

978     public static String JavaDoc getIANA2JavaMapping(String JavaDoc ianaEncoding) {
979         return (String JavaDoc)fIANA2JavaMap.get(ianaEncoding);
980     } // getIANA2JavaMapping(String):String
981

982     /**
983      * Removes an IANA to Java encoding name mapping.
984      *
985      * @param ianaEncoding The IANA encoding name.
986      */

987     public static String JavaDoc removeIANA2JavaMapping(String JavaDoc ianaEncoding) {
988         return (String JavaDoc)fIANA2JavaMap.remove(ianaEncoding);
989     } // removeIANA2JavaMapping(String):String
990

991     /**
992      * Adds a Java to IANA encoding name mapping.
993      *
994      * @param javaEncoding The Java encoding name.
995      * @param ianaEncoding The IANA encoding name.
996      */

997     public static void putJava2IANAMapping(String JavaDoc javaEncoding,
998                                            String JavaDoc ianaEncoding) {
999         fJava2IANAMap.put(javaEncoding, ianaEncoding);
1000    } // putJava2IANAMapping(String,String)
1001

1002    /**
1003     * Returns the IANA encoding name for the specified Java encoding name.
1004     *
1005     * @param javaEncoding The Java encoding name.
1006     */

1007    public static String JavaDoc getJava2IANAMapping(String JavaDoc javaEncoding) {
1008        return (String JavaDoc)fJava2IANAMap.get(javaEncoding);
1009    } // getJava2IANAMapping(String):String
1010

1011    /**
1012     * Removes a Java to IANA encoding name mapping.
1013     *
1014     * @param javaEncoding The Java encoding name.
1015     */

1016    public static String JavaDoc removeJava2IANAMapping(String JavaDoc javaEncoding) {
1017        return (String JavaDoc)fJava2IANAMap.remove(javaEncoding);
1018    } // removeJava2IANAMapping
1019

1020} // class EncodingMap
1021
Popular Tags