0001: /*
0002: * The Apache Software License, Version 1.1
0003: *
0004: *
0005: * Copyright (c) 1999-2002 The Apache Software Foundation.
0006: * All rights reserved.
0007: *
0008: * Redistribution and use in source and binary forms, with or without
0009: * modification, are permitted provided that the following conditions
0010: * are met:
0011: *
0012: * 1. Redistributions of source code must retain the above copyright
0013: * notice, this list of conditions and the following disclaimer.
0014: *
0015: * 2. Redistributions in binary form must reproduce the above copyright
0016: * notice, this list of conditions and the following disclaimer in
0017: * the documentation and/or other materials provided with the
0018: * distribution.
0019: *
0020: * 3. The end-user documentation included with the redistribution,
0021: * if any, must include the following acknowledgment:
0022: * "This product includes software developed by the
0023: * Apache Software Foundation (http://www.apache.org/)."
0024: * Alternately, this acknowledgment may appear in the software itself,
0025: * if and wherever such third-party acknowledgments normally appear.
0026: *
0027: * 4. The names "Xerces" and "Apache Software Foundation" must
0028: * not be used to endorse or promote products derived from this
0029: * software without prior written permission. For written
0030: * permission, please contact apache@apache.org.
0031: *
0032: * 5. Products derived from this software may not be called "Apache",
0033: * nor may "Apache" appear in their name, without prior written
0034: * permission of the Apache Software Foundation.
0035: *
0036: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
0037: * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
0038: * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
0039: * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
0040: * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
0041: * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
0042: * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
0043: * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
0044: * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
0045: * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
0046: * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
0047: * SUCH DAMAGE.
0048: * ====================================================================
0049: *
0050: * This software consists of voluntary contributions made by many
0051: * individuals on behalf of the Apache Software Foundation and was
0052: * originally based on software copyright (c) 1999, International
0053: * Business Machines, Inc., http://www.apache.org. For more
0054: * information on the Apache Software Foundation, please see
0055: * <http://www.apache.org/>.
0056: */
0057:
0058: package com.sun.xml.stream.xerces.util;
0059:
0060: import java.util.Hashtable;
0061:
0062: /**
0063: * EncodingMap is a convenience class which handles conversions between
0064: * IANA encoding names and Java encoding names, and vice versa. The
0065: * encoding names used in XML instance documents <strong>must</strong>
0066: * be the IANA encoding names specified or one of the aliases for those names
0067: * which IANA defines.
0068: * <p>
0069: * <TABLE BORDER="0" WIDTH="100%">
0070: * <TR>
0071: * <TD WIDTH="33%">
0072: * <P ALIGN="CENTER"><B>Common Name</B>
0073: * </TD>
0074: * <TD WIDTH="15%">
0075: * <P ALIGN="CENTER"><B>Use this name in XML files</B>
0076: * </TD>
0077: * <TD WIDTH="12%">
0078: * <P ALIGN="CENTER"><B>Name Type</B>
0079: * </TD>
0080: * <TD WIDTH="31%">
0081: * <P ALIGN="CENTER"><B>Xerces converts to this Java Encoder Name</B>
0082: * </TD>
0083: * </TR>
0084: * <TR>
0085: * <TD WIDTH="33%">8 bit Unicode</TD>
0086: * <TD WIDTH="15%">
0087: * <P ALIGN="CENTER">UTF-8
0088: * </TD>
0089: * <TD WIDTH="12%">
0090: * <P ALIGN="CENTER">IANA
0091: * </TD>
0092: * <TD WIDTH="31%">
0093: * <P ALIGN="CENTER">UTF8
0094: * </TD>
0095: * </TR>
0096: * <TR>
0097: * <TD WIDTH="33%">ISO Latin 1</TD>
0098: * <TD WIDTH="15%">
0099: * <P ALIGN="CENTER">ISO-8859-1
0100: * </TD>
0101: * <TD WIDTH="12%">
0102: * <P ALIGN="CENTER">MIME
0103: * </TD>
0104: * <TD WIDTH="31%">
0105: * <P ALIGN="CENTER">ISO-8859-1
0106: * </TD>
0107: * </TR>
0108: * <TR>
0109: * <TD WIDTH="33%">ISO Latin 2</TD>
0110: * <TD WIDTH="15%">
0111: * <P ALIGN="CENTER">ISO-8859-2
0112: * </TD>
0113: * <TD WIDTH="12%">
0114: * <P ALIGN="CENTER">MIME
0115: * </TD>
0116: * <TD WIDTH="31%">
0117: * <P ALIGN="CENTER">ISO-8859-2
0118: * </TD>
0119: * </TR>
0120: * <TR>
0121: * <TD WIDTH="33%">ISO Latin 3</TD>
0122: * <TD WIDTH="15%">
0123: * <P ALIGN="CENTER">ISO-8859-3
0124: * </TD>
0125: * <TD WIDTH="12%">
0126: * <P ALIGN="CENTER">MIME
0127: * </TD>
0128: * <TD WIDTH="31%">
0129: * <P ALIGN="CENTER">ISO-8859-3
0130: * </TD>
0131: * </TR>
0132: * <TR>
0133: * <TD WIDTH="33%">ISO Latin 4</TD>
0134: * <TD WIDTH="15%">
0135: * <P ALIGN="CENTER">ISO-8859-4
0136: * </TD>
0137: * <TD WIDTH="12%">
0138: * <P ALIGN="CENTER">MIME
0139: * </TD>
0140: * <TD WIDTH="31%">
0141: * <P ALIGN="CENTER">ISO-8859-4
0142: * </TD>
0143: * </TR>
0144: * <TR>
0145: * <TD WIDTH="33%">ISO Latin Cyrillic</TD>
0146: * <TD WIDTH="15%">
0147: * <P ALIGN="CENTER">ISO-8859-5
0148: * </TD>
0149: * <TD WIDTH="12%">
0150: * <P ALIGN="CENTER">MIME
0151: * </TD>
0152: * <TD WIDTH="31%">
0153: * <P ALIGN="CENTER">ISO-8859-5
0154: * </TD>
0155: * </TR>
0156: * <TR>
0157: * <TD WIDTH="33%">ISO Latin Arabic</TD>
0158: * <TD WIDTH="15%">
0159: * <P ALIGN="CENTER">ISO-8859-6
0160: * </TD>
0161: * <TD WIDTH="12%">
0162: * <P ALIGN="CENTER">MIME
0163: * </TD>
0164: * <TD WIDTH="31%">
0165: * <P ALIGN="CENTER">ISO-8859-6
0166: * </TD>
0167: * </TR>
0168: * <TR>
0169: * <TD WIDTH="33%">ISO Latin Greek</TD>
0170: * <TD WIDTH="15%">
0171: * <P ALIGN="CENTER">ISO-8859-7
0172: * </TD>
0173: * <TD WIDTH="12%">
0174: * <P ALIGN="CENTER">MIME
0175: * </TD>
0176: * <TD WIDTH="31%">
0177: * <P ALIGN="CENTER">ISO-8859-7
0178: * </TD>
0179: * </TR>
0180: * <TR>
0181: * <TD WIDTH="33%">ISO Latin Hebrew</TD>
0182: * <TD WIDTH="15%">
0183: * <P ALIGN="CENTER">ISO-8859-8
0184: * </TD>
0185: * <TD WIDTH="12%">
0186: * <P ALIGN="CENTER">MIME
0187: * </TD>
0188: * <TD WIDTH="31%">
0189: * <P ALIGN="CENTER">ISO-8859-8
0190: * </TD>
0191: * </TR>
0192: * <TR>
0193: * <TD WIDTH="33%">ISO Latin 5</TD>
0194: * <TD WIDTH="15%">
0195: * <P ALIGN="CENTER">ISO-8859-9
0196: * </TD>
0197: * <TD WIDTH="12%">
0198: * <P ALIGN="CENTER">MIME
0199: * </TD>
0200: * <TD WIDTH="31%">
0201: * <P ALIGN="CENTER">ISO-8859-9
0202: * </TD>
0203: * </TR>
0204: * <TR>
0205: * <TD WIDTH="33%">EBCDIC: US</TD>
0206: * <TD WIDTH="15%">
0207: * <P ALIGN="CENTER">ebcdic-cp-us
0208: * </TD>
0209: * <TD WIDTH="12%">
0210: * <P ALIGN="CENTER">IANA
0211: * </TD>
0212: * <TD WIDTH="31%">
0213: * <P ALIGN="CENTER">cp037
0214: * </TD>
0215: * </TR>
0216: * <TR>
0217: * <TD WIDTH="33%">EBCDIC: Canada</TD>
0218: * <TD WIDTH="15%">
0219: * <P ALIGN="CENTER">ebcdic-cp-ca
0220: * </TD>
0221: * <TD WIDTH="12%">
0222: * <P ALIGN="CENTER">IANA
0223: * </TD>
0224: * <TD WIDTH="31%">
0225: * <P ALIGN="CENTER">cp037
0226: * </TD>
0227: * </TR>
0228: * <TR>
0229: * <TD WIDTH="33%">EBCDIC: Netherlands</TD>
0230: * <TD WIDTH="15%">
0231: * <P ALIGN="CENTER">ebcdic-cp-nl
0232: * </TD>
0233: * <TD WIDTH="12%">
0234: * <P ALIGN="CENTER">IANA
0235: * </TD>
0236: * <TD WIDTH="31%">
0237: * <P ALIGN="CENTER">cp037
0238: * </TD>
0239: * </TR>
0240: * <TR>
0241: * <TD WIDTH="33%">EBCDIC: Denmark</TD>
0242: * <TD WIDTH="15%">
0243: * <P ALIGN="CENTER">ebcdic-cp-dk
0244: * </TD>
0245: * <TD WIDTH="12%">
0246: * <P ALIGN="CENTER">IANA
0247: * </TD>
0248: * <TD WIDTH="31%">
0249: * <P ALIGN="CENTER">cp277
0250: * </TD>
0251: * </TR>
0252: * <TR>
0253: * <TD WIDTH="33%">EBCDIC: Norway</TD>
0254: * <TD WIDTH="15%">
0255: * <P ALIGN="CENTER">ebcdic-cp-no
0256: * </TD>
0257: * <TD WIDTH="12%">
0258: * <P ALIGN="CENTER">IANA
0259: * </TD>
0260: * <TD WIDTH="31%">
0261: * <P ALIGN="CENTER">cp277
0262: * </TD>
0263: * </TR>
0264: * <TR>
0265: * <TD WIDTH="33%">EBCDIC: Finland</TD>
0266: * <TD WIDTH="15%">
0267: * <P ALIGN="CENTER">ebcdic-cp-fi
0268: * </TD>
0269: * <TD WIDTH="12%">
0270: * <P ALIGN="CENTER">IANA
0271: * </TD>
0272: * <TD WIDTH="31%">
0273: * <P ALIGN="CENTER">cp278
0274: * </TD>
0275: * </TR>
0276: * <TR>
0277: * <TD WIDTH="33%">EBCDIC: Sweden</TD>
0278: * <TD WIDTH="15%">
0279: * <P ALIGN="CENTER">ebcdic-cp-se
0280: * </TD>
0281: * <TD WIDTH="12%">
0282: * <P ALIGN="CENTER">IANA
0283: * </TD>
0284: * <TD WIDTH="31%">
0285: * <P ALIGN="CENTER">cp278
0286: * </TD>
0287: * </TR>
0288: * <TR>
0289: * <TD WIDTH="33%">EBCDIC: Italy</TD>
0290: * <TD WIDTH="15%">
0291: * <P ALIGN="CENTER">ebcdic-cp-it
0292: * </TD>
0293: * <TD WIDTH="12%">
0294: * <P ALIGN="CENTER">IANA
0295: * </TD>
0296: * <TD WIDTH="31%">
0297: * <P ALIGN="CENTER">cp280
0298: * </TD>
0299: * </TR>
0300: * <TR>
0301: * <TD WIDTH="33%">EBCDIC: Spain, Latin America</TD>
0302: * <TD WIDTH="15%">
0303: * <P ALIGN="CENTER">ebcdic-cp-es
0304: * </TD>
0305: * <TD WIDTH="12%">
0306: * <P ALIGN="CENTER">IANA
0307: * </TD>
0308: * <TD WIDTH="31%">
0309: * <P ALIGN="CENTER">cp284
0310: * </TD>
0311: * </TR>
0312: * <TR>
0313: * <TD WIDTH="33%">EBCDIC: Great Britain</TD>
0314: * <TD WIDTH="15%">
0315: * <P ALIGN="CENTER">ebcdic-cp-gb
0316: * </TD>
0317: * <TD WIDTH="12%">
0318: * <P ALIGN="CENTER">IANA
0319: * </TD>
0320: * <TD WIDTH="31%">
0321: * <P ALIGN="CENTER">cp285
0322: * </TD>
0323: * </TR>
0324: * <TR>
0325: * <TD WIDTH="33%">EBCDIC: France</TD>
0326: * <TD WIDTH="15%">
0327: * <P ALIGN="CENTER">ebcdic-cp-fr
0328: * </TD>
0329: * <TD WIDTH="12%">
0330: * <P ALIGN="CENTER">IANA
0331: * </TD>
0332: * <TD WIDTH="31%">
0333: * <P ALIGN="CENTER">cp297
0334: * </TD>
0335: * </TR>
0336: * <TR>
0337: * <TD WIDTH="33%">EBCDIC: Arabic</TD>
0338: * <TD WIDTH="15%">
0339: * <P ALIGN="CENTER">ebcdic-cp-ar1
0340: * </TD>
0341: * <TD WIDTH="12%">
0342: * <P ALIGN="CENTER">IANA
0343: * </TD>
0344: * <TD WIDTH="31%">
0345: * <P ALIGN="CENTER">cp420
0346: * </TD>
0347: * </TR>
0348: * <TR>
0349: * <TD WIDTH="33%">EBCDIC: Hebrew</TD>
0350: * <TD WIDTH="15%">
0351: * <P ALIGN="CENTER">ebcdic-cp-he
0352: * </TD>
0353: * <TD WIDTH="12%">
0354: * <P ALIGN="CENTER">IANA
0355: * </TD>
0356: * <TD WIDTH="31%">
0357: * <P ALIGN="CENTER">cp424
0358: * </TD>
0359: * </TR>
0360: * <TR>
0361: * <TD WIDTH="33%">EBCDIC: Switzerland</TD>
0362: * <TD WIDTH="15%">
0363: * <P ALIGN="CENTER">ebcdic-cp-ch
0364: * </TD>
0365: * <TD WIDTH="12%">
0366: * <P ALIGN="CENTER">IANA
0367: * </TD>
0368: * <TD WIDTH="31%">
0369: * <P ALIGN="CENTER">cp500
0370: * </TD>
0371: * </TR>
0372: * <TR>
0373: * <TD WIDTH="33%">EBCDIC: Roece</TD>
0374: * <TD WIDTH="15%">
0375: * <P ALIGN="CENTER">ebcdic-cp-roece
0376: * </TD>
0377: * <TD WIDTH="12%">
0378: * <P ALIGN="CENTER">IANA
0379: * </TD>
0380: * <TD WIDTH="31%">
0381: * <P ALIGN="CENTER">cp870
0382: * </TD>
0383: * </TR>
0384: * <TR>
0385: * <TD WIDTH="33%">EBCDIC: Yugoslavia</TD>
0386: * <TD WIDTH="15%">
0387: * <P ALIGN="CENTER">ebcdic-cp-yu
0388: * </TD>
0389: * <TD WIDTH="12%">
0390: * <P ALIGN="CENTER">IANA
0391: * </TD>
0392: * <TD WIDTH="31%">
0393: * <P ALIGN="CENTER">cp870
0394: * </TD>
0395: * </TR>
0396: * <TR>
0397: * <TD WIDTH="33%">EBCDIC: Iceland</TD>
0398: * <TD WIDTH="15%">
0399: * <P ALIGN="CENTER">ebcdic-cp-is
0400: * </TD>
0401: * <TD WIDTH="12%">
0402: * <P ALIGN="CENTER">IANA
0403: * </TD>
0404: * <TD WIDTH="31%">
0405: * <P ALIGN="CENTER">cp871
0406: * </TD>
0407: * </TR>
0408: * <TR>
0409: * <TD WIDTH="33%">EBCDIC: Urdu</TD>
0410: * <TD WIDTH="15%">
0411: * <P ALIGN="CENTER">ebcdic-cp-ar2
0412: * </TD>
0413: * <TD WIDTH="12%">
0414: * <P ALIGN="CENTER">IANA
0415: * </TD>
0416: * <TD WIDTH="31%">
0417: * <P ALIGN="CENTER">cp918
0418: * </TD>
0419: * </TR>
0420: * <TR>
0421: * <TD WIDTH="33%">Chinese for PRC, mixed 1/2 byte</TD>
0422: * <TD WIDTH="15%">
0423: * <P ALIGN="CENTER">gb2312
0424: * </TD>
0425: * <TD WIDTH="12%">
0426: * <P ALIGN="CENTER">MIME
0427: * </TD>
0428: * <TD WIDTH="31%">
0429: * <P ALIGN="CENTER">GB2312
0430: * </TD>
0431: * </TR>
0432: * <TR>
0433: * <TD WIDTH="33%">Extended Unix Code, packed for Japanese</TD>
0434: * <TD WIDTH="15%">
0435: * <P ALIGN="CENTER">euc-jp
0436: * </TD>
0437: * <TD WIDTH="12%">
0438: * <P ALIGN="CENTER">MIME
0439: * </TD>
0440: * <TD WIDTH="31%">
0441: * <P ALIGN="CENTER">eucjis
0442: * </TD>
0443: * </TR>
0444: * <TR>
0445: * <TD WIDTH="33%">Japanese: iso-2022-jp</TD>
0446: * <TD WIDTH="15%">
0447: * <P ALIGN="CENTER">iso-2020-jp
0448: * </TD>
0449: * <TD WIDTH="12%">
0450: * <P ALIGN="CENTER">MIME
0451: * </TD>
0452: * <TD WIDTH="31%">
0453: * <P ALIGN="CENTER">JIS
0454: * </TD>
0455: * </TR>
0456: * <TR>
0457: * <TD WIDTH="33%">Japanese: Shift JIS</TD>
0458: * <TD WIDTH="15%">
0459: * <P ALIGN="CENTER">Shift_JIS
0460: * </TD>
0461: * <TD WIDTH="12%">
0462: * <P ALIGN="CENTER">MIME
0463: * </TD>
0464: * <TD WIDTH="31%">
0465: * <P ALIGN="CENTER">SJIS
0466: * </TD>
0467: * </TR>
0468: * <TR>
0469: * <TD WIDTH="33%">Chinese: Big5</TD>
0470: * <TD WIDTH="15%">
0471: * <P ALIGN="CENTER">Big5
0472: * </TD>
0473: * <TD WIDTH="12%">
0474: * <P ALIGN="CENTER">MIME
0475: * </TD>
0476: * <TD WIDTH="31%">
0477: * <P ALIGN="CENTER">Big5
0478: * </TD>
0479: * </TR>
0480: * <TR>
0481: * <TD WIDTH="33%">Extended Unix Code, packed for Korean</TD>
0482: * <TD WIDTH="15%">
0483: * <P ALIGN="CENTER">euc-kr
0484: * </TD>
0485: * <TD WIDTH="12%">
0486: * <P ALIGN="CENTER">MIME
0487: * </TD>
0488: * <TD WIDTH="31%">
0489: * <P ALIGN="CENTER">iso2022kr
0490: * </TD>
0491: * </TR>
0492: * <TR>
0493: * <TD WIDTH="33%">Cyrillic</TD>
0494: * <TD WIDTH="15%">
0495: * <P ALIGN="CENTER">koi8-r
0496: * </TD>
0497: * <TD WIDTH="12%">
0498: * <P ALIGN="CENTER">MIME
0499: * </TD>
0500: * <TD WIDTH="31%">
0501: * <P ALIGN="CENTER">koi8-r
0502: * </TD>
0503: * </TR>
0504: * </TABLE>
0505: *
0506: * @author TAMURA Kent, IBM
0507: * @author Andy Clark, IBM
0508: *
0509: * @version $Id: EncodingMap.java,v 1.2 2006/04/01 06:01:40 jeffsuttor Exp $
0510: */
0511: public class EncodingMap {
0512:
0513: //
0514: // Data
0515: //
0516:
0517: /** fIANA2JavaMap */
0518: protected final static Hashtable fIANA2JavaMap = new Hashtable();
0519:
0520: /** fJava2IANAMap */
0521: protected final static Hashtable fJava2IANAMap = new Hashtable();
0522:
0523: //
0524: // Static initialization
0525: //
0526:
0527: static {
0528:
0529: // add IANA to Java encoding mappings.
0530: fIANA2JavaMap.put("BIG5", "Big5");
0531: fIANA2JavaMap.put("CSBIG5", "Big5");
0532: fIANA2JavaMap.put("CP037", "CP037");
0533: fIANA2JavaMap.put("IBM037", "CP037");
0534: fIANA2JavaMap.put("CSIBM037", "CP037");
0535: fIANA2JavaMap.put("EBCDIC-CP-US", "CP037");
0536: fIANA2JavaMap.put("EBCDIC-CP-CA", "CP037");
0537: fIANA2JavaMap.put("EBCDIC-CP-NL", "CP037");
0538: fIANA2JavaMap.put("EBCDIC-CP-WT", "CP037");
0539: fIANA2JavaMap.put("IBM273", "CP273");
0540: fIANA2JavaMap.put("CP273", "CP273");
0541: fIANA2JavaMap.put("CSIBM273", "CP273");
0542: fIANA2JavaMap.put("IBM277", "CP277");
0543: fIANA2JavaMap.put("CP277", "CP277");
0544: fIANA2JavaMap.put("CSIBM277", "CP277");
0545: fIANA2JavaMap.put("EBCDIC-CP-DK", "CP277");
0546: fIANA2JavaMap.put("EBCDIC-CP-NO", "CP277");
0547: fIANA2JavaMap.put("IBM278", "CP278");
0548: fIANA2JavaMap.put("CP278", "CP278");
0549: fIANA2JavaMap.put("CSIBM278", "CP278");
0550: fIANA2JavaMap.put("EBCDIC-CP-FI", "CP278");
0551: fIANA2JavaMap.put("EBCDIC-CP-SE", "CP278");
0552: fIANA2JavaMap.put("IBM280", "CP280");
0553: fIANA2JavaMap.put("CP280", "CP280");
0554: fIANA2JavaMap.put("CSIBM280", "CP280");
0555: fIANA2JavaMap.put("EBCDIC-CP-IT", "CP280");
0556: fIANA2JavaMap.put("IBM284", "CP284");
0557: fIANA2JavaMap.put("CP284", "CP284");
0558: fIANA2JavaMap.put("CSIBM284", "CP284");
0559: fIANA2JavaMap.put("EBCDIC-CP-ES", "CP284");
0560: fIANA2JavaMap.put("EBCDIC-CP-GB", "CP285");
0561: fIANA2JavaMap.put("IBM285", "CP285");
0562: fIANA2JavaMap.put("CP285", "CP285");
0563: fIANA2JavaMap.put("CSIBM285", "CP285");
0564: fIANA2JavaMap.put("EBCDIC-JP-KANA", "CP290");
0565: fIANA2JavaMap.put("IBM290", "CP290");
0566: fIANA2JavaMap.put("CP290", "CP290");
0567: fIANA2JavaMap.put("CSIBM290", "CP290");
0568: fIANA2JavaMap.put("EBCDIC-CP-FR", "CP297");
0569: fIANA2JavaMap.put("IBM297", "CP297");
0570: fIANA2JavaMap.put("CP297", "CP297");
0571: fIANA2JavaMap.put("CSIBM297", "CP297");
0572: fIANA2JavaMap.put("EBCDIC-CP-AR1", "CP420");
0573: fIANA2JavaMap.put("IBM420", "CP420");
0574: fIANA2JavaMap.put("CP420", "CP420");
0575: fIANA2JavaMap.put("CSIBM420", "CP420");
0576: fIANA2JavaMap.put("EBCDIC-CP-HE", "CP424");
0577: fIANA2JavaMap.put("IBM424", "CP424");
0578: fIANA2JavaMap.put("CP424", "CP424");
0579: fIANA2JavaMap.put("CSIBM424", "CP424");
0580: fIANA2JavaMap.put("IBM437", "CP437");
0581: fIANA2JavaMap.put("437", "CP437");
0582: fIANA2JavaMap.put("CP437", "CP437");
0583: fIANA2JavaMap.put("CSPC8CODEPAGE437", "CP437");
0584: fIANA2JavaMap.put("EBCDIC-CP-CH", "CP500");
0585: fIANA2JavaMap.put("IBM500", "CP500");
0586: fIANA2JavaMap.put("CP500", "CP500");
0587: fIANA2JavaMap.put("CSIBM500", "CP500");
0588: fIANA2JavaMap.put("EBCDIC-CP-CH", "CP500");
0589: fIANA2JavaMap.put("EBCDIC-CP-BE", "CP500");
0590: fIANA2JavaMap.put("IBM775", "CP775");
0591: fIANA2JavaMap.put("CP775", "CP775");
0592: fIANA2JavaMap.put("CSPC775BALTIC", "CP775");
0593: fIANA2JavaMap.put("IBM850", "CP850");
0594: fIANA2JavaMap.put("850", "CP850");
0595: fIANA2JavaMap.put("CP850", "CP850");
0596: fIANA2JavaMap.put("CSPC850MULTILINGUAL", "CP850");
0597: fIANA2JavaMap.put("IBM852", "CP852");
0598: fIANA2JavaMap.put("852", "CP852");
0599: fIANA2JavaMap.put("CP852", "CP852");
0600: fIANA2JavaMap.put("CSPCP852", "CP852");
0601: fIANA2JavaMap.put("IBM855", "CP855");
0602: fIANA2JavaMap.put("855", "CP855");
0603: fIANA2JavaMap.put("CP855", "CP855");
0604: fIANA2JavaMap.put("CSIBM855", "CP855");
0605: fIANA2JavaMap.put("IBM857", "CP857");
0606: fIANA2JavaMap.put("857", "CP857");
0607: fIANA2JavaMap.put("CP857", "CP857");
0608: fIANA2JavaMap.put("CSIBM857", "CP857");
0609: fIANA2JavaMap.put("IBM00858", "CP858");
0610: fIANA2JavaMap.put("CP00858", "CP858");
0611: fIANA2JavaMap.put("CCSID00858", "CP858");
0612: fIANA2JavaMap.put("IBM860", "CP860");
0613: fIANA2JavaMap.put("860", "CP860");
0614: fIANA2JavaMap.put("CP860", "CP860");
0615: fIANA2JavaMap.put("CSIBM860", "CP860");
0616: fIANA2JavaMap.put("IBM861", "CP861");
0617: fIANA2JavaMap.put("861", "CP861");
0618: fIANA2JavaMap.put("CP861", "CP861");
0619: fIANA2JavaMap.put("CP-IS", "CP861");
0620: fIANA2JavaMap.put("CSIBM861", "CP861");
0621: fIANA2JavaMap.put("IBM862", "CP862");
0622: fIANA2JavaMap.put("862", "CP862");
0623: fIANA2JavaMap.put("CP862", "CP862");
0624: fIANA2JavaMap.put("CSPC862LATINHEBREW", "CP862");
0625: fIANA2JavaMap.put("IBM863", "CP863");
0626: fIANA2JavaMap.put("863", "CP863");
0627: fIANA2JavaMap.put("CP863", "CP863");
0628: fIANA2JavaMap.put("CSIBM863", "CP863");
0629: fIANA2JavaMap.put("IBM864", "CP864");
0630: fIANA2JavaMap.put("CP864", "CP864");
0631: fIANA2JavaMap.put("CSIBM864", "CP864");
0632: fIANA2JavaMap.put("IBM865", "CP865");
0633: fIANA2JavaMap.put("865", "CP865");
0634: fIANA2JavaMap.put("CP865", "CP865");
0635: fIANA2JavaMap.put("CSIBM865", "CP865");
0636: fIANA2JavaMap.put("IBM866", "CP866");
0637: fIANA2JavaMap.put("866", "CP866");
0638: fIANA2JavaMap.put("CP866", "CP866");
0639: fIANA2JavaMap.put("CSIBM866", "CP866");
0640: fIANA2JavaMap.put("IBM868", "CP868");
0641: fIANA2JavaMap.put("CP868", "CP868");
0642: fIANA2JavaMap.put("CSIBM868", "CP868");
0643: fIANA2JavaMap.put("CP-AR", "CP868");
0644: fIANA2JavaMap.put("IBM869", "CP869");
0645: fIANA2JavaMap.put("CP869", "CP869");
0646: fIANA2JavaMap.put("CSIBM869", "CP869");
0647: fIANA2JavaMap.put("CP-GR", "CP869");
0648: fIANA2JavaMap.put("IBM870", "CP870");
0649: fIANA2JavaMap.put("CP870", "CP870");
0650: fIANA2JavaMap.put("CSIBM870", "CP870");
0651: fIANA2JavaMap.put("EBCDIC-CP-ROECE", "CP870");
0652: fIANA2JavaMap.put("EBCDIC-CP-YU", "CP870");
0653: fIANA2JavaMap.put("IBM871", "CP871");
0654: fIANA2JavaMap.put("CP871", "CP871");
0655: fIANA2JavaMap.put("CSIBM871", "CP871");
0656: fIANA2JavaMap.put("EBCDIC-CP-IS", "CP871");
0657: fIANA2JavaMap.put("IBM918", "CP918");
0658: fIANA2JavaMap.put("CP918", "CP918");
0659: fIANA2JavaMap.put("CSIBM918", "CP918");
0660: fIANA2JavaMap.put("EBCDIC-CP-AR2", "CP918");
0661: fIANA2JavaMap.put("IBM00924", "CP924");
0662: fIANA2JavaMap.put("CP00924", "CP924");
0663: fIANA2JavaMap.put("CCSID00924", "CP924");
0664: // is this an error???
0665: fIANA2JavaMap.put("EBCDIC-LATIN9--EURO", "CP924");
0666: fIANA2JavaMap.put("IBM1026", "CP1026");
0667: fIANA2JavaMap.put("CP1026", "CP1026");
0668: fIANA2JavaMap.put("CSIBM1026", "CP1026");
0669: fIANA2JavaMap.put("IBM01140", "Cp1140");
0670: fIANA2JavaMap.put("CP01140", "Cp1140");
0671: fIANA2JavaMap.put("CCSID01140", "Cp1140");
0672: fIANA2JavaMap.put("IBM01141", "Cp1141");
0673: fIANA2JavaMap.put("CP01141", "Cp1141");
0674: fIANA2JavaMap.put("CCSID01141", "Cp1141");
0675: fIANA2JavaMap.put("IBM01142", "Cp1142");
0676: fIANA2JavaMap.put("CP01142", "Cp1142");
0677: fIANA2JavaMap.put("CCSID01142", "Cp1142");
0678: fIANA2JavaMap.put("IBM01143", "Cp1143");
0679: fIANA2JavaMap.put("CP01143", "Cp1143");
0680: fIANA2JavaMap.put("CCSID01143", "Cp1143");
0681: fIANA2JavaMap.put("IBM01144", "Cp1144");
0682: fIANA2JavaMap.put("CP01144", "Cp1144");
0683: fIANA2JavaMap.put("CCSID01144", "Cp1144");
0684: fIANA2JavaMap.put("IBM01145", "Cp1145");
0685: fIANA2JavaMap.put("CP01145", "Cp1145");
0686: fIANA2JavaMap.put("CCSID01145", "Cp1145");
0687: fIANA2JavaMap.put("IBM01146", "Cp1146");
0688: fIANA2JavaMap.put("CP01146", "Cp1146");
0689: fIANA2JavaMap.put("CCSID01146", "Cp1146");
0690: fIANA2JavaMap.put("IBM01147", "Cp1147");
0691: fIANA2JavaMap.put("CP01147", "Cp1147");
0692: fIANA2JavaMap.put("CCSID01147", "Cp1147");
0693: fIANA2JavaMap.put("IBM01148", "Cp1148");
0694: fIANA2JavaMap.put("CP01148", "Cp1148");
0695: fIANA2JavaMap.put("CCSID01148", "Cp1148");
0696: fIANA2JavaMap.put("IBM01149", "Cp1149");
0697: fIANA2JavaMap.put("CP01149", "Cp1149");
0698: fIANA2JavaMap.put("CCSID01149", "Cp1149");
0699: fIANA2JavaMap.put("EUC-JP", "EUCJIS");
0700: fIANA2JavaMap.put("CSEUCPKDFMTJAPANESE", "EUCJIS");
0701: fIANA2JavaMap.put(
0702: "EXTENDED_UNIX_CODE_PACKED_FORMAT_FOR_JAPANESE",
0703: "EUCJIS");
0704: fIANA2JavaMap.put("EUC-KR", "KSC5601");
0705: fIANA2JavaMap.put("GB2312", "GB2312");
0706: fIANA2JavaMap.put("CSGB2312", "GB2312");
0707: fIANA2JavaMap.put("ISO-2022-JP", "JIS");
0708: fIANA2JavaMap.put("CSISO2022JP", "JIS");
0709: fIANA2JavaMap.put("ISO-2022-KR", "ISO2022KR");
0710: fIANA2JavaMap.put("CSISO2022KR", "ISO2022KR");
0711: fIANA2JavaMap.put("ISO-2022-CN", "ISO2022CN");
0712:
0713: fIANA2JavaMap.put("X0201", "JIS0201");
0714: fIANA2JavaMap.put("CSISO13JISC6220JP", "JIS0201");
0715: fIANA2JavaMap.put("X0208", "JIS0208");
0716: fIANA2JavaMap.put("ISO-IR-87", "JIS0208");
0717: fIANA2JavaMap.put("X0208dbiJIS_X0208-1983", "JIS0208");
0718: fIANA2JavaMap.put("CSISO87JISX0208", "JIS0208");
0719: fIANA2JavaMap.put("X0212", "JIS0212");
0720: fIANA2JavaMap.put("ISO-IR-159", "JIS0212");
0721: fIANA2JavaMap.put("CSISO159JISX02121990", "JIS0212");
0722: fIANA2JavaMap.put("GB18030", "GB18030");
0723: fIANA2JavaMap.put("SHIFT_JIS", "SJIS");
0724: fIANA2JavaMap.put("CSSHIFTJIS", "SJIS");
0725: fIANA2JavaMap.put("MS_KANJI", "SJIS");
0726: fIANA2JavaMap.put("WINDOWS-31J", "MS932");
0727: fIANA2JavaMap.put("CSWINDOWS31J", "MS932");
0728:
0729: // Add support for Cp1252 and its friends
0730: fIANA2JavaMap.put("WINDOWS-1250", "Cp1250");
0731: fIANA2JavaMap.put("WINDOWS-1251", "Cp1251");
0732: fIANA2JavaMap.put("WINDOWS-1252", "Cp1252");
0733: fIANA2JavaMap.put("WINDOWS-1253", "Cp1253");
0734: fIANA2JavaMap.put("WINDOWS-1254", "Cp1254");
0735: fIANA2JavaMap.put("WINDOWS-1255", "Cp1255");
0736: fIANA2JavaMap.put("WINDOWS-1256", "Cp1256");
0737: fIANA2JavaMap.put("WINDOWS-1257", "Cp1257");
0738: fIANA2JavaMap.put("WINDOWS-1258", "Cp1258");
0739: fIANA2JavaMap.put("TIS-620", "TIS620");
0740:
0741: fIANA2JavaMap.put("ISO-8859-1", "ISO8859_1");
0742: fIANA2JavaMap.put("ISO-IR-100", "ISO8859_1");
0743: fIANA2JavaMap.put("ISO_8859-1", "ISO8859_1");
0744: fIANA2JavaMap.put("LATIN1", "ISO8859_1");
0745: fIANA2JavaMap.put("CSISOLATIN1", "ISO8859_1");
0746: fIANA2JavaMap.put("L1", "ISO8859_1");
0747: fIANA2JavaMap.put("IBM819", "ISO8859_1");
0748: fIANA2JavaMap.put("CP819", "ISO8859_1");
0749:
0750: fIANA2JavaMap.put("ISO-8859-2", "ISO8859_2");
0751: fIANA2JavaMap.put("ISO-IR-101", "ISO8859_2");
0752: fIANA2JavaMap.put("ISO_8859-2", "ISO8859_2");
0753: fIANA2JavaMap.put("LATIN2", "ISO8859_2");
0754: fIANA2JavaMap.put("CSISOLATIN2", "ISO8859_2");
0755: fIANA2JavaMap.put("L2", "ISO8859_2");
0756:
0757: fIANA2JavaMap.put("ISO-8859-3", "ISO8859_3");
0758: fIANA2JavaMap.put("ISO-IR-109", "ISO8859_3");
0759: fIANA2JavaMap.put("ISO_8859-3", "ISO8859_3");
0760: fIANA2JavaMap.put("LATIN3", "ISO8859_3");
0761: fIANA2JavaMap.put("CSISOLATIN3", "ISO8859_3");
0762: fIANA2JavaMap.put("L3", "ISO8859_3");
0763:
0764: fIANA2JavaMap.put("ISO-8859-4", "ISO8859_4");
0765: fIANA2JavaMap.put("ISO-IR-110", "ISO8859_4");
0766: fIANA2JavaMap.put("ISO_8859-4", "ISO8859_4");
0767: fIANA2JavaMap.put("LATIN4", "ISO8859_4");
0768: fIANA2JavaMap.put("CSISOLATIN4", "ISO8859_4");
0769: fIANA2JavaMap.put("L4", "ISO8859_4");
0770:
0771: fIANA2JavaMap.put("ISO-8859-5", "ISO8859_5");
0772: fIANA2JavaMap.put("ISO-IR-144", "ISO8859_5");
0773: fIANA2JavaMap.put("ISO_8859-5", "ISO8859_5");
0774: fIANA2JavaMap.put("CYRILLIC", "ISO8859_5");
0775: fIANA2JavaMap.put("CSISOLATINCYRILLIC", "ISO8859_5");
0776:
0777: fIANA2JavaMap.put("ISO-8859-6", "ISO8859_6");
0778: fIANA2JavaMap.put("ISO-IR-127", "ISO8859_6");
0779: fIANA2JavaMap.put("ISO_8859-6", "ISO8859_6");
0780: fIANA2JavaMap.put("ECMA-114", "ISO8859_6");
0781: fIANA2JavaMap.put("ASMO-708", "ISO8859_6");
0782: fIANA2JavaMap.put("ARABIC", "ISO8859_6");
0783: fIANA2JavaMap.put("CSISOLATINARABIC", "ISO8859_6");
0784:
0785: fIANA2JavaMap.put("ISO-8859-7", "ISO8859_7");
0786: fIANA2JavaMap.put("ISO-IR-126", "ISO8859_7");
0787: fIANA2JavaMap.put("ISO_8859-7", "ISO8859_7");
0788: fIANA2JavaMap.put("ELOT_928", "ISO8859_7");
0789: fIANA2JavaMap.put("ECMA-118", "ISO8859_7");
0790: fIANA2JavaMap.put("GREEK", "ISO8859_7");
0791: fIANA2JavaMap.put("CSISOLATINGREEK", "ISO8859_7");
0792: fIANA2JavaMap.put("GREEK8", "ISO8859_7");
0793:
0794: fIANA2JavaMap.put("ISO-8859-8", "ISO8859_8");
0795: fIANA2JavaMap.put("ISO-8859-8-I", "ISO8859_8"); // added since this encoding only differs w.r.t. presentation
0796: fIANA2JavaMap.put("ISO-IR-138", "ISO8859_8");
0797: fIANA2JavaMap.put("ISO_8859-8", "ISO8859_8");
0798: fIANA2JavaMap.put("HEBREW", "ISO8859_8");
0799: fIANA2JavaMap.put("CSISOLATINHEBREW", "ISO8859_8");
0800:
0801: fIANA2JavaMap.put("ISO-8859-9", "ISO8859_9");
0802: fIANA2JavaMap.put("ISO-IR-148", "ISO8859_9");
0803: fIANA2JavaMap.put("ISO_8859-9", "ISO8859_9");
0804: fIANA2JavaMap.put("LATIN5", "ISO8859_9");
0805: fIANA2JavaMap.put("CSISOLATIN5", "ISO8859_9");
0806: fIANA2JavaMap.put("L5", "ISO8859_9");
0807:
0808: fIANA2JavaMap.put("ISO-8859-15", "ISO8859_15");
0809: fIANA2JavaMap.put("ISO_8859-15", "ISO8859_15");
0810:
0811: fIANA2JavaMap.put("KOI8-R", "KOI8_R");
0812: fIANA2JavaMap.put("CSKOI8R", "KOI8_R");
0813: fIANA2JavaMap.put("US-ASCII", "ASCII");
0814: fIANA2JavaMap.put("ISO-IR-6", "ASCII");
0815: fIANA2JavaMap.put("ANSI_X3.4-1986", "ASCII");
0816: fIANA2JavaMap.put("ISO_646.IRV:1991", "ASCII");
0817: fIANA2JavaMap.put("ASCII", "ASCII");
0818: fIANA2JavaMap.put("CSASCII", "ASCII");
0819: fIANA2JavaMap.put("ISO646-US", "ASCII");
0820: fIANA2JavaMap.put("US", "ASCII");
0821: fIANA2JavaMap.put("IBM367", "ASCII");
0822: fIANA2JavaMap.put("CP367", "ASCII");
0823: fIANA2JavaMap.put("UTF-8", "UTF8");
0824: fIANA2JavaMap.put("UTF-16", "UTF-16");
0825: fIANA2JavaMap.put("UTF-16BE", "UnicodeBig");
0826: fIANA2JavaMap.put("UTF-16LE", "UnicodeLittle");
0827:
0828: // support for 1047, as proposed to be added to the
0829: // IANA registry in
0830: // http://lists.w3.org/Archives/Public/ietf-charset/2002JulSep/0049.html
0831: fIANA2JavaMap.put("IBM-1047", "Cp1047");
0832: fIANA2JavaMap.put("IBM1047", "Cp1047");
0833: fIANA2JavaMap.put("CP1047", "Cp1047");
0834:
0835: // Adding new aliases as proposed in
0836: // http://lists.w3.org/Archives/Public/ietf-charset/2002JulSep/0058.html
0837: fIANA2JavaMap.put("IBM-37", "CP037");
0838: fIANA2JavaMap.put("IBM-273", "CP273");
0839: fIANA2JavaMap.put("IBM-277", "CP277");
0840: fIANA2JavaMap.put("IBM-278", "CP278");
0841: fIANA2JavaMap.put("IBM-280", "CP280");
0842: fIANA2JavaMap.put("IBM-284", "CP284");
0843: fIANA2JavaMap.put("IBM-285", "CP285");
0844: fIANA2JavaMap.put("IBM-290", "CP290");
0845: fIANA2JavaMap.put("IBM-297", "CP297");
0846: fIANA2JavaMap.put("IBM-420", "CP420");
0847: fIANA2JavaMap.put("IBM-424", "CP424");
0848: fIANA2JavaMap.put("IBM-437", "CP437");
0849: fIANA2JavaMap.put("IBM-500", "CP500");
0850: fIANA2JavaMap.put("IBM-775", "CP775");
0851: fIANA2JavaMap.put("IBM-850", "CP850");
0852: fIANA2JavaMap.put("IBM-852", "CP852");
0853: fIANA2JavaMap.put("IBM-855", "CP855");
0854: fIANA2JavaMap.put("IBM-857", "CP857");
0855: fIANA2JavaMap.put("IBM-858", "CP858");
0856: fIANA2JavaMap.put("IBM-860", "CP860");
0857: fIANA2JavaMap.put("IBM-861", "CP861");
0858: fIANA2JavaMap.put("IBM-862", "CP862");
0859: fIANA2JavaMap.put("IBM-863", "CP863");
0860: fIANA2JavaMap.put("IBM-864", "CP864");
0861: fIANA2JavaMap.put("IBM-865", "CP865");
0862: fIANA2JavaMap.put("IBM-866", "CP866");
0863: fIANA2JavaMap.put("IBM-868", "CP868");
0864: fIANA2JavaMap.put("IBM-869", "CP869");
0865: fIANA2JavaMap.put("IBM-870", "CP870");
0866: fIANA2JavaMap.put("IBM-871", "CP871");
0867: fIANA2JavaMap.put("IBM-918", "CP918");
0868: fIANA2JavaMap.put("IBM-924", "CP924");
0869: fIANA2JavaMap.put("IBM-1026", "CP1026");
0870: fIANA2JavaMap.put("IBM-1140", "Cp1140");
0871: fIANA2JavaMap.put("IBM-1141", "Cp1141");
0872: fIANA2JavaMap.put("IBM-1142", "Cp1142");
0873: fIANA2JavaMap.put("IBM-1143", "Cp1143");
0874: fIANA2JavaMap.put("IBM-1144", "Cp1144");
0875: fIANA2JavaMap.put("IBM-1145", "Cp1145");
0876: fIANA2JavaMap.put("IBM-1146", "Cp1146");
0877: fIANA2JavaMap.put("IBM-1147", "Cp1147");
0878: fIANA2JavaMap.put("IBM-1148", "Cp1148");
0879: fIANA2JavaMap.put("IBM-1149", "Cp1149");
0880: fIANA2JavaMap.put("IBM-819", "ISO8859_1");
0881: fIANA2JavaMap.put("IBM-367", "ASCII");
0882:
0883: // REVISIT:
0884: // j:CNS11643 -> EUC-TW?
0885: // ISO-2022-CN? ISO-2022-CN-EXT?
0886:
0887: // add Java to IANA encoding mappings
0888: //fJava2IANAMap.put("8859_1", "US-ASCII"); // ?
0889: fJava2IANAMap.put("ISO8859_1", "ISO-8859-1");
0890: fJava2IANAMap.put("ISO8859_2", "ISO-8859-2");
0891: fJava2IANAMap.put("ISO8859_3", "ISO-8859-3");
0892: fJava2IANAMap.put("ISO8859_4", "ISO-8859-4");
0893: fJava2IANAMap.put("ISO8859_5", "ISO-8859-5");
0894: fJava2IANAMap.put("ISO8859_6", "ISO-8859-6");
0895: fJava2IANAMap.put("ISO8859_7", "ISO-8859-7");
0896: fJava2IANAMap.put("ISO8859_8", "ISO-8859-8");
0897: fJava2IANAMap.put("ISO8859_9", "ISO-8859-9");
0898: fJava2IANAMap.put("ISO8859_15", "ISO-8859-15");
0899: fJava2IANAMap.put("Big5", "BIG5");
0900: fJava2IANAMap.put("CP037", "EBCDIC-CP-US");
0901: fJava2IANAMap.put("CP273", "IBM273");
0902: fJava2IANAMap.put("CP277", "EBCDIC-CP-DK");
0903: fJava2IANAMap.put("CP278", "EBCDIC-CP-FI");
0904: fJava2IANAMap.put("CP280", "EBCDIC-CP-IT");
0905: fJava2IANAMap.put("CP284", "EBCDIC-CP-ES");
0906: fJava2IANAMap.put("CP285", "EBCDIC-CP-GB");
0907: fJava2IANAMap.put("CP290", "EBCDIC-JP-KANA");
0908: fJava2IANAMap.put("CP297", "EBCDIC-CP-FR");
0909: fJava2IANAMap.put("CP420", "EBCDIC-CP-AR1");
0910: fJava2IANAMap.put("CP424", "EBCDIC-CP-HE");
0911: fJava2IANAMap.put("CP437", "IBM437");
0912: fJava2IANAMap.put("CP500", "EBCDIC-CP-CH");
0913: fJava2IANAMap.put("CP775", "IBM775");
0914: fJava2IANAMap.put("CP850", "IBM850");
0915: fJava2IANAMap.put("CP852", "IBM852");
0916: fJava2IANAMap.put("CP855", "IBM855");
0917: fJava2IANAMap.put("CP857", "IBM857");
0918: fJava2IANAMap.put("CP858", "IBM00858");
0919: fJava2IANAMap.put("CP860", "IBM860");
0920: fJava2IANAMap.put("CP861", "IBM861");
0921: fJava2IANAMap.put("CP862", "IBM862");
0922: fJava2IANAMap.put("CP863", "IBM863");
0923: fJava2IANAMap.put("CP864", "IBM864");
0924: fJava2IANAMap.put("CP865", "IBM865");
0925: fJava2IANAMap.put("CP866", "IBM866");
0926: fJava2IANAMap.put("CP868", "IBM868");
0927: fJava2IANAMap.put("CP869", "IBM869");
0928: fJava2IANAMap.put("CP870", "EBCDIC-CP-ROECE");
0929: fJava2IANAMap.put("CP871", "EBCDIC-CP-IS");
0930: fJava2IANAMap.put("CP918", "EBCDIC-CP-AR2");
0931: fJava2IANAMap.put("CP924", "IBM00924");
0932: fJava2IANAMap.put("CP1026", "IBM1026");
0933: fJava2IANAMap.put("Cp01140", "IBM01140");
0934: fJava2IANAMap.put("Cp01141", "IBM01141");
0935: fJava2IANAMap.put("Cp01142", "IBM01142");
0936: fJava2IANAMap.put("Cp01143", "IBM01143");
0937: fJava2IANAMap.put("Cp01144", "IBM01144");
0938: fJava2IANAMap.put("Cp01145", "IBM01145");
0939: fJava2IANAMap.put("Cp01146", "IBM01146");
0940: fJava2IANAMap.put("Cp01147", "IBM01147");
0941: fJava2IANAMap.put("Cp01148", "IBM01148");
0942: fJava2IANAMap.put("Cp01149", "IBM01149");
0943: fJava2IANAMap.put("EUCJIS", "EUC-JP");
0944: fJava2IANAMap.put("GB2312", "GB2312");
0945: fJava2IANAMap.put("ISO2022KR", "ISO-2022-KR");
0946: fJava2IANAMap.put("ISO2022CN", "ISO-2022-CN");
0947: fJava2IANAMap.put("JIS", "ISO-2022-JP");
0948: fJava2IANAMap.put("KOI8_R", "KOI8-R");
0949: fJava2IANAMap.put("KSC5601", "EUC-KR");
0950: fJava2IANAMap.put("GB18030", "GB18030");
0951: fJava2IANAMap.put("SJIS", "SHIFT_JIS");
0952: fJava2IANAMap.put("MS932", "WINDOWS-31J");
0953: fJava2IANAMap.put("UTF8", "UTF-8");
0954: fJava2IANAMap.put("Unicode", "UTF-16");
0955: fJava2IANAMap.put("UnicodeBig", "UTF-16BE");
0956: fJava2IANAMap.put("UnicodeLittle", "UTF-16LE");
0957: fJava2IANAMap.put("JIS0201", "X0201");
0958: fJava2IANAMap.put("JIS0208", "X0208");
0959: fJava2IANAMap.put("JIS0212", "ISO-IR-159");
0960:
0961: // proposed addition (see above for details):
0962: fJava2IANAMap.put("CP1047", "IBM1047");
0963:
0964: } // <clinit>()
0965:
0966: //
0967: // Constructors
0968: //
0969:
0970: /** Default constructor. */
0971: public EncodingMap() {
0972: }
0973:
0974: //
0975: // Public static methods
0976: //
0977:
0978: /**
0979: * Adds an IANA to Java encoding name mapping.
0980: *
0981: * @param ianaEncoding The IANA encoding name.
0982: * @param javaEncoding The Java encoding name.
0983: */
0984: public static void putIANA2JavaMapping(String ianaEncoding,
0985: String javaEncoding) {
0986: fIANA2JavaMap.put(ianaEncoding, javaEncoding);
0987: } // putIANA2JavaMapping(String,String)
0988:
0989: /**
0990: * Returns the Java encoding name for the specified IANA encoding name.
0991: *
0992: * @param ianaEncoding The IANA encoding name.
0993: */
0994: public static String getIANA2JavaMapping(String ianaEncoding) {
0995: return (String) fIANA2JavaMap.get(ianaEncoding);
0996: } // getIANA2JavaMapping(String):String
0997:
0998: /**
0999: * Removes an IANA to Java encoding name mapping.
1000: *
1001: * @param ianaEncoding The IANA encoding name.
1002: */
1003: public static String removeIANA2JavaMapping(String ianaEncoding) {
1004: return (String) fIANA2JavaMap.remove(ianaEncoding);
1005: } // removeIANA2JavaMapping(String):String
1006:
1007: /**
1008: * Adds a Java to IANA encoding name mapping.
1009: *
1010: * @param javaEncoding The Java encoding name.
1011: * @param ianaEncoding The IANA encoding name.
1012: */
1013: public static void putJava2IANAMapping(String javaEncoding,
1014: String ianaEncoding) {
1015: fJava2IANAMap.put(javaEncoding, ianaEncoding);
1016: } // putJava2IANAMapping(String,String)
1017:
1018: /**
1019: * Returns the IANA encoding name for the specified Java encoding name.
1020: *
1021: * @param javaEncoding The Java encoding name.
1022: */
1023: public static String getJava2IANAMapping(String javaEncoding) {
1024: return (String) fJava2IANAMap.get(javaEncoding);
1025: } // getJava2IANAMapping(String):String
1026:
1027: /**
1028: * Removes a Java to IANA encoding name mapping.
1029: *
1030: * @param javaEncoding The Java encoding name.
1031: */
1032: public static String removeJava2IANAMapping(String javaEncoding) {
1033: return (String) fJava2IANAMap.remove(javaEncoding);
1034: } // removeJava2IANAMapping
1035:
1036: } // class EncodingMap
|