src/jdk.charsets/share/classes/sun/nio/cs/ext/SJIS_0213.java

Print this page




  42  *
  43  *  (1)Single-Byte
  44  *     JIS_X_0213 does not define single-byte character itself, the
  45  *     JIS_X_0201 entries are added in for sjis implementation.
  46  *
  47  *  (2)Double-Byte SJIS <-> BMP Unicode
  48  *     ex: 0x8140 U+3000    # IDEOGRAPHIC SPACE
  49  *
  50  *  (3)Double-Byte SJIS <-> Supplementary
  51  *     ex: 0xFCF0 U+2A61A   # <cjk> [2000] [Unicode3.1]
  52  *
  53  *  (4)Double-Byte SJIS <-> Composite
  54  *   ex: 0x83F6 U+31F7+309A # [2000]
  55  *
  56  *  (5)"Windows-only" special mapping entries
  57  *     are handled by MS932_0213.
  58  */
  59 
  60 public class SJIS_0213 extends Charset {
  61     public SJIS_0213() {
  62         super("x-SJIS_0213", ExtendedCharsets.aliasesFor("SJIS_0213"));
  63     }
  64 
  65     public boolean contains(Charset cs) {
  66         return ((cs.name().equals("US-ASCII"))
  67                 || (cs instanceof SJIS)
  68                 || (cs instanceof SJIS_0213));
  69     }
  70 
  71     public CharsetDecoder newDecoder() {
  72         return new Decoder(this);
  73     }
  74 
  75     public CharsetEncoder newEncoder() {
  76         return new Encoder(this);
  77     }
  78 
  79     static CharsetMapping mapping = AccessController.doPrivileged(
  80         new PrivilegedAction<CharsetMapping>() {
  81             public CharsetMapping run() {
  82                 return CharsetMapping.get(SJIS_0213.class.getResourceAsStream("sjis0213.dat"));




  42  *
  43  *  (1)Single-Byte
  44  *     JIS_X_0213 does not define single-byte character itself, the
  45  *     JIS_X_0201 entries are added in for sjis implementation.
  46  *
  47  *  (2)Double-Byte SJIS <-> BMP Unicode
  48  *     ex: 0x8140 U+3000    # IDEOGRAPHIC SPACE
  49  *
  50  *  (3)Double-Byte SJIS <-> Supplementary
  51  *     ex: 0xFCF0 U+2A61A   # <cjk> [2000] [Unicode3.1]
  52  *
  53  *  (4)Double-Byte SJIS <-> Composite
  54  *   ex: 0x83F6 U+31F7+309A # [2000]
  55  *
  56  *  (5)"Windows-only" special mapping entries
  57  *     are handled by MS932_0213.
  58  */
  59 
  60 public class SJIS_0213 extends Charset {
  61     public SJIS_0213() {
  62         super("x-SJIS_0213", ExtendedCharsets.aliasesFor("x-SJIS_0213"));
  63     }
  64 
  65     public boolean contains(Charset cs) {
  66         return ((cs.name().equals("US-ASCII"))
  67                 || (cs instanceof SJIS)
  68                 || (cs instanceof SJIS_0213));
  69     }
  70 
  71     public CharsetDecoder newDecoder() {
  72         return new Decoder(this);
  73     }
  74 
  75     public CharsetEncoder newEncoder() {
  76         return new Encoder(this);
  77     }
  78 
  79     static CharsetMapping mapping = AccessController.doPrivileged(
  80         new PrivilegedAction<CharsetMapping>() {
  81             public CharsetMapping run() {
  82                 return CharsetMapping.get(SJIS_0213.class.getResourceAsStream("sjis0213.dat"));