1298 lines · 40.1 KB · Java
RawDownload
/* * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.  Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package sun.nio.cs.ext; import java.lang.ref.SoftReference;import java.nio.charset.Charset;import java.nio.charset.spi.CharsetProvider;import sun.nio.cs.AbstractCharsetProvider;import java.security.AccessController;import sun.security.action.GetPropertyAction;  /** * Provider for extended charsets. */ public class ExtendedCharsets    extends AbstractCharsetProvider{     static volatile ExtendedCharsets instance = null;     public ExtendedCharsets() {         super("sun.nio.cs.ext");  // identify provider pkg name.         // Traditional Chinese         charset("Big5", "Big5",                new String[] {                    // IANA aliases                    "csBig5"                });         charset("x-MS950-HKSCS-XP", "MS950_HKSCS_XP",                new String[] {                    "MS950_HKSCS_XP"  // JDK historical;                });         charset("x-MS950-HKSCS", "MS950_HKSCS",                new String[] {                    // IANA aliases                    "MS950_HKSCS"     // JDK historical;                });         charset("x-windows-950", "MS950",                new String[] {                    "ms950",    // JDK historical                    "windows-950"                });         charset("x-windows-874", "MS874",                new String[] {                    "ms874",  // JDK historical                    "ms-874",                    "windows-874" });         charset("x-EUC-TW", "EUC_TW",                new String[] {                    "euc_tw", // JDK historical                    "euctw",                    "cns11643",                    "EUC-TW"                });         charset("Big5-HKSCS", "Big5_HKSCS",                new String[] {                    "Big5_HKSCS", // JDK historical                    "big5hk",                    "big5-hkscs",                    "big5hkscs"   // Linux alias                });         charset("x-Big5-HKSCS-2001", "Big5_HKSCS_2001",                new String[] {                    "Big5_HKSCS_2001",                    "big5hk-2001",                    "big5-hkscs-2001",                    "big5-hkscs:unicode3.0",                    "big5hkscs-2001",                });         charset("x-Big5-Solaris", "Big5_Solaris",                new String[] {                    "Big5_Solaris", // JDK historical                });         // Simplified Chinese        charset("GBK", "GBK",                new String[] {                    "windows-936",                    "CP936"                });         charset("GB18030", "GB18030",                new String[] {                    "gb18030-2000"                });         charset("GB2312", "EUC_CN",                new String[] {                    // IANA aliases                    "gb2312",                    "gb2312-80",                    "gb2312-1980",                    "euc-cn",                    "euccn",                    "x-EUC-CN", // 1.4 compatability                    "EUC_CN" //JDK historical                });         charset("x-mswin-936", "MS936",                new String[] {                    "ms936", // historical                    // IANA aliases                    "ms_936"                });         // The definition of this charset may be overridden by the init method,        // below, if the sun.nio.cs.map property is defined.        //        charset("Shift_JIS", "SJIS",                new String[] {                    // IANA aliases                    "sjis", // historical                    "shift_jis",                    "shift-jis",                    "ms_kanji",                    "x-sjis",                    "csShiftJIS"                });         // The definition of this charset may be overridden by the init method,        // below, if the sun.nio.cs.map property is defined.        //        charset("windows-31j", "MS932",                new String[] {                    "MS932", // JDK historical                    "windows-932",                    "csWindows31J"                });         charset("JIS_X0201", "JIS_X_0201",                new String[] {                    "JIS0201", // JDK historical                    // IANA aliases                    "JIS_X0201",                    "X0201",                    "csHalfWidthKatakana"                });         charset("x-JIS0208", "JIS_X_0208",                new String[] {                    "JIS0208", // JDK historical                    // IANA aliases                    "JIS_C6226-1983",                    "iso-ir-87",                    "x0208",                    "JIS_X0208-1983",                    "csISO87JISX0208"                });         charset("JIS_X0212-1990", "JIS_X_0212",                new String[] {                    "JIS0212", // JDK historical                    // IANA aliases                    "jis_x0212-1990",                    "x0212",                    "iso-ir-159",                    "csISO159JISX02121990"                });         charset("x-SJIS_0213", "SJIS_0213",                new String[] {                    "sjis-0213",                    "sjis_0213",                    "sjis:2004",                    "sjis_0213:2004",                    "shift_jis_0213:2004",                    "shift_jis:2004"                });         charset("x-MS932_0213", "MS932_0213",                new String[] {                    "MS932-0213",                    "MS932_0213",                    "MS932:2004",                    "windows-932-0213",                    "windows-932:2004"                });         charset("EUC-JP", "EUC_JP",                new String[] {                    "euc_jp", // JDK historical                    // IANA aliases                    "eucjis",                    "eucjp",                    "Extended_UNIX_Code_Packed_Format_for_Japanese",                    "csEUCPkdFmtjapanese",                    "x-euc-jp",                    "x-eucjp"                });         charset("x-euc-jp-linux", "EUC_JP_LINUX",                new String[] {                    "euc_jp_linux", // JDK historical                    "euc-jp-linux"                });         charset("x-eucjp-open", "EUC_JP_Open",                new String[] {                    "EUC_JP_Solaris",   // JDK historical                    "eucJP-open"                });         charset("x-PCK", "PCK",                new String[] {                    // IANA aliases                    "pck" // historical                });         charset("ISO-2022-JP", "ISO2022_JP",            new String[] {            // IANA aliases            "iso2022jp", // historical            "jis",            "csISO2022JP",            "jis_encoding",            "csjisencoding"        });         charset("ISO-2022-JP-2", "ISO2022_JP_2",            new String[] {            // IANA aliases            "csISO2022JP2",            "iso2022jp2"        });         charset("x-windows-50221", "MS50221",            new String[] {            "ms50221", // historical            "cp50221",        });         charset("x-windows-50220", "MS50220",            new String[] {            "ms50220", // historical            "cp50220",        });         charset("x-windows-iso2022jp", "MSISO2022JP",            new String[] {            "windows-iso2022jp", // historical        });         charset("x-JISAutoDetect", "JISAutoDetect",                new String[] {                    "JISAutoDetect" // historical                });         // Korean        charset("EUC-KR", "EUC_KR",                new String[] {                    "euc_kr", // JDK historical                    // IANA aliases                    "ksc5601",                    "euckr",                    "ks_c_5601-1987",                    "ksc5601-1987",                    "ksc5601_1987",                    "ksc_5601",                    "csEUCKR",                    "5601"                });         charset("x-windows-949", "MS949",                new String[] {                    "ms949",    // JDK historical                    "windows949",                    "windows-949",                    // IANA aliases                    "ms_949"                });         charset("x-Johab", "Johab",                new String[] {                        "ksc5601-1992",                        "ksc5601_1992",                        "ms1361",                        "johab" // JDK historical                });         charset("ISO-2022-KR", "ISO2022_KR",                new String[] {                        "ISO2022KR", // JDK historical                        "csISO2022KR"                });         charset("ISO-2022-CN", "ISO2022_CN",                new String[] {                        "ISO2022CN", // JDK historical                        "csISO2022CN"                });         charset("x-ISO-2022-CN-CNS", "ISO2022_CN_CNS",                new String[] {                        "ISO2022CN_CNS", // JDK historical                        "ISO-2022-CN-CNS"                });         charset("x-ISO-2022-CN-GB", "ISO2022_CN_GB",                new String[] {                        "ISO2022CN_GB", // JDK historical                        "ISO-2022-CN-GB"                });         charset("x-ISCII91", "ISCII91",                new String[] {                        "iscii",                        "ST_SEV_358-88",                        "iso-ir-153",                        "csISO153GOST1976874",                        "ISCII91" // JDK historical                });         charset("ISO-8859-3", "ISO_8859_3",                new String[] {                    "iso8859_3", // JDK historical                    "8859_3",                    "ISO_8859-3:1988",                    "iso-ir-109",                    "ISO_8859-3",                    "ISO8859-3",                    "latin3",                    "l3",                    "ibm913",                    "ibm-913",                    "cp913",                    "913",                    "csISOLatin3"                });         charset("ISO-8859-6", "ISO_8859_6",                new String[] {                    "iso8859_6", // JDK historical                    "8859_6",                    "iso-ir-127",                    "ISO_8859-6",                    "ISO_8859-6:1987",                    "ISO8859-6",                    "ECMA-114",                    "ASMO-708",                    "arabic",                    "ibm1089",                    "ibm-1089",                    "cp1089",                    "1089",                    "csISOLatinArabic"                });         charset("ISO-8859-8", "ISO_8859_8",                new String[] {                    "iso8859_8", // JDK historical                    "8859_8",                    "iso-ir-138",                    "ISO_8859-8",                    "ISO_8859-8:1988",                    "ISO8859-8",                    "cp916",                    "916",                    "ibm916",                    "ibm-916",                    "hebrew",                    "csISOLatinHebrew"                });         charset("x-ISO-8859-11", "ISO_8859_11",                new String[] {                    "iso-8859-11",                    "iso8859_11"                });         charset("TIS-620", "TIS_620",                new String[] {                    "tis620", // JDK historical                    "tis620.2533"                });         // Various Microsoft Windows international codepages         charset("windows-1255", "MS1255",                new String[] {                    "cp1255" // JDK historical                });         charset("windows-1256", "MS1256",                new String[] {                    "cp1256" // JDK historical                });         charset("windows-1258", "MS1258",                new String[] {                    "cp1258" // JDK historical                });         // IBM & PC/MSDOS encodings         charset("x-IBM942", "IBM942",                new String[] {                    "cp942", // JDK historical                    "ibm942",                    "ibm-942",                    "942"                });         charset("x-IBM942C", "IBM942C",                new String[] {                    "cp942C", // JDK historical                    "ibm942C",                    "ibm-942C",                    "942C"                });         charset("x-IBM943", "IBM943",                new String[] {                    "cp943", // JDK historical                    "ibm943",                    "ibm-943",                    "943"                });         charset("x-IBM943C", "IBM943C",                new String[] {                    "cp943C", // JDK historical                    "ibm943C",                    "ibm-943C",                    "943C"                });         charset("x-IBM948", "IBM948",                new String[] {                    "cp948", // JDK historical                    "ibm948",                    "ibm-948",                    "948"                });         charset("x-IBM950", "IBM950",                new String[] {                    "cp950", // JDK historical                    "ibm950",                    "ibm-950",                    "950"                });         charset("x-IBM930", "IBM930",                new String[] {                    "cp930", // JDK historical                    "ibm930",                    "ibm-930",                    "930"                });         charset("x-IBM935", "IBM935",                new String[] {                    "cp935", // JDK historical                    "ibm935",                    "ibm-935",                    "935"                });         charset("x-IBM937", "IBM937",                new String[] {                    "cp937", // JDK historical                    "ibm937",                    "ibm-937",                    "937"

Lines 1–500 of 1298.