Source Code Cross Referenced for EncodingMap.java in  » Sevlet-Container » apache-tomcat-6.0.14 » org » apache » jasper » xmlparser » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Sevlet Container » apache tomcat 6.0.14 » org.apache.jasper.xmlparser 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


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