## org.apache.xerces.util
Class EncodingMap

    java.lang.Object
      |
      +--org.apache.xerces.util.EncodingMap

public class EncodingMap
extends java.lang.Object

EncodingMap is a convenience class which handles conversions between IANA encoding names and Java encoding names, and vice versa. The encoding names used in XML instance documents must be the IANA encoding names specified or one of the aliases for those names which IANA defines.

Common Name | Use this name in XML files | Name Type | Xerces converts to this Java Encoder Name
8 bit Unicode | UTF-8 | IANA | UTF8
ISO Latin 1 | ISO-8859-1 | MIME | ISO-8859-1
ISO Latin 2 | ISO-8859-2 | MIME | ISO-8859-2
ISO Latin 3 | ISO-8859-3 | MIME | ISO-8859-3
ISO Latin 4 | ISO-8859-4 | MIME | ISO-8859-4
ISO Latin Cyrillic | ISO-8859-5 | MIME | ISO-8859-5
ISO Latin Arabic | ISO-8859-6 | MIME | ISO-8859-6
ISO Latin Greek | ISO-8859-7 | MIME | ISO-8859-7
ISO Latin Hebrew | ISO-8859-8 | MIME | ISO-8859-8
ISO Latin 5 | ISO-8859-9 | MIME | ISO-8859-9
EBCDIC: US | ebcdic-cp-us | IANA | cp037
EBCDIC: Canada | ebcdic-cp-ca | IANA | cp037
EBCDIC: Netherlands | ebcdic-cp-nl | IANA | cp037
EBCDIC: Denmark | ebcdic-cp-dk | IANA | cp277
EBCDIC: Norway | ebcdic-cp-no | IANA | cp277
EBCDIC: Finland | ebcdic-cp-fi | IANA | cp278
EBCDIC: Sweden | ebcdic-cp-se | IANA | cp278
EBCDIC: Italy | ebcdic-cp-it | IANA | cp280
EBCDIC: Spain, Latin America | ebcdic-cp-es | IANA | cp284
EBCDIC: Great Britain | ebcdic-cp-gb | IANA | cp285
EBCDIC: France | ebcdic-cp-fr | IANA | cp297
EBCDIC: Arabic | ebcdic-cp-ar1 | IANA | cp420
EBCDIC: Hebrew | ebcdic-cp-he | IANA | cp424
EBCDIC: Switzerland | ebcdic-cp-ch | IANA | cp500
EBCDIC: Roece | ebcdic-cp-roece | IANA | cp870
EBCDIC: Yugoslavia | ebcdic-cp-yu | IANA | cp870
EBCDIC: Iceland | ebcdic-cp-is | IANA | cp871
EBCDIC: Urdu | ebcdic-cp-ar2 | IANA | cp918
Chinese for PRC, mixed 1/2 byte | gb2312 | MIME | GB2312
Extended Unix Code, packed for Japanese | euc-jp | MIME | eucjis
Japanese: iso-2022-jp | iso-2020-jp | MIME | JIS
Japanese: Shift JIS | Shift_JIS | MIME | SJIS
Chinese: Big5 | Big5 | MIME | Big5
Extended Unix Code, packed for Korean | euc-kr | MIME | iso2022kr
Cyrillic | koi8-r | MIME | koi8-r

Version:
  $Id: EncodingMap.java 447241 2006-09-18 05:12:57Z mrglavas $
Author:
  TAMURA Kent, IBM, Andy Clark, IBM

Field Summary
`protected static java.util.Hashtable` `fIANA2JavaMap` fIANA2JavaMap
`protected static java.util.Hashtable` `fJava2IANAMap` fJava2IANAMap

Constructor Summary
`EncodingMap()` Default constructor.

Method Summary
`static java.lang.String` `getIANA2JavaMapping(java.lang.String ianaEncoding)` Returns the Java encoding name for the specified IANA encoding name.
`static java.lang.String` `getJava2IANAMapping(java.lang.String javaEncoding)` Returns the IANA encoding name for the specified Java encoding name.
`static void` `putIANA2JavaMapping(java.lang.String ianaEncoding, java.lang.String javaEncoding)` Deprecated. Use of this method is not recommended. Its effect is JVM wide and may cause unforeseen behaviour for other applications running in the system.
`static void` `putJava2IANAMapping(java.lang.String javaEncoding, java.lang.String ianaEncoding)` Deprecated. Use of this method is not recommended. Its effect is JVM wide and may cause unforeseen behaviour for other applications running in the system.
`static java.lang.String` `removeIANA2JavaMapping(java.lang.String ianaEncoding)` Deprecated. Use of this method is not recommended. Its effect is JVM wide and may cause unforeseen behaviour for other applications running in the system.
`static java.lang.String` `removeJava2IANAMapping(java.lang.String javaEncoding)` Deprecated. Use of this method is not recommended. Its effect is JVM wide and may cause unforeseen behaviour for other applications running in the system.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### fIANA2JavaMap

    protected static final java.util.Hashtable fIANA2JavaMap

  fIANA2JavaMap

### fJava2IANAMap

    protected static final java.util.Hashtable fJava2IANAMap

  fJava2IANAMap

Constructor Detail

### EncodingMap

    public EncodingMap()

  Default constructor.

Method Detail

### putIANA2JavaMapping

    public static void putIANA2JavaMapping(java.lang.String ianaEncoding,
                                           java.lang.String javaEncoding)

  Deprecated. Use of this method is not recommended. Its effect is JVM wide and may cause unforeseen behaviour for other applications running in the system.

  Adds an IANA to Java encoding name mapping.
  Parameters:
    `ianaEncoding` - The IANA encoding name.
    `javaEncoding` - The Java encoding name.

### getIANA2JavaMapping

    public static java.lang.String getIANA2JavaMapping(java.lang.String ianaEncoding)

  Returns the Java encoding name for the specified IANA encoding name.
  Parameters:
    `ianaEncoding` - The IANA encoding name.

### removeIANA2JavaMapping

    public static java.lang.String removeIANA2JavaMapping(java.lang.String ianaEncoding)

  Deprecated. Use of this method is not recommended. Its effect is JVM wide and may cause unforeseen behaviour for other applications running in the system.

  Removes an IANA to Java encoding name mapping.
  Parameters:
    `ianaEncoding` - The IANA encoding name.

### putJava2IANAMapping

    public static void putJava2IANAMapping(java.lang.String javaEncoding,
                                           java.lang.String ianaEncoding)

  Deprecated. Use of this method is not recommended. Its effect is JVM wide and may cause unforeseen behaviour for other applications running in the system.

  Adds a Java to IANA encoding name mapping.
  Parameters:
    `javaEncoding` - The Java encoding name.
    `ianaEncoding` - The IANA encoding name.

### getJava2IANAMapping

    public static java.lang.String getJava2IANAMapping(java.lang.String javaEncoding)

  Returns the IANA encoding name for the specified Java encoding name.
  Parameters:
    `javaEncoding` - The Java encoding name.

### removeJava2IANAMapping

    public static java.lang.String removeJava2IANAMapping(java.lang.String javaEncoding)

  Deprecated. Use of this method is not recommended. Its effect is JVM wide and may cause unforeseen behaviour for other applications running in the system.

  Removes a Java to IANA encoding name mapping.
  Parameters:
    `javaEncoding` - The Java encoding name.

Copyright © 1999-2007 The Apache Software Foundation. All Rights Reserved.