0N/A/*
4944N/A * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/A
0N/Apackage sun.nio.cs.ext;
0N/A
0N/Aimport java.lang.ref.SoftReference;
0N/Aimport java.nio.charset.Charset;
0N/Aimport java.nio.charset.spi.CharsetProvider;
0N/Aimport sun.nio.cs.AbstractCharsetProvider;
0N/Aimport java.security.AccessController;
0N/Aimport sun.security.action.GetPropertyAction;
0N/A
0N/A
0N/A/**
0N/A * Provider for extended charsets.
0N/A */
0N/A
0N/Apublic class ExtendedCharsets
0N/A extends AbstractCharsetProvider
0N/A{
0N/A
0N/A static volatile ExtendedCharsets instance = null;
0N/A
0N/A public ExtendedCharsets() {
0N/A
0N/A super("sun.nio.cs.ext"); // identify provider pkg name.
0N/A
0N/A // Traditional Chinese
0N/A
0N/A charset("Big5", "Big5",
0N/A new String[] {
0N/A // IANA aliases
0N/A "csBig5"
0N/A });
0N/A
2246N/A charset("x-MS950-HKSCS-XP", "MS950_HKSCS_XP",
2246N/A new String[] {
2246N/A "MS950_HKSCS_XP" // JDK historical;
2246N/A });
2246N/A
0N/A charset("x-MS950-HKSCS", "MS950_HKSCS",
0N/A new String[] {
0N/A // IANA aliases
2246N/A "MS950_HKSCS" // JDK historical;
0N/A });
0N/A
0N/A charset("x-windows-950", "MS950",
0N/A new String[] {
0N/A "ms950", // JDK historical
0N/A "windows-950"
0N/A });
0N/A
0N/A charset("x-windows-874", "MS874",
0N/A new String[] {
0N/A "ms874", // JDK historical
0N/A "ms-874",
0N/A "windows-874" });
0N/A
0N/A charset("x-EUC-TW", "EUC_TW",
0N/A new String[] {
0N/A "euc_tw", // JDK historical
0N/A "euctw",
0N/A "cns11643",
0N/A "EUC-TW"
0N/A });
0N/A
0N/A charset("Big5-HKSCS", "Big5_HKSCS",
0N/A new String[] {
0N/A "Big5_HKSCS", // JDK historical
0N/A "big5hk",
0N/A "big5-hkscs",
2246N/A "big5hkscs" // Linux alias
2246N/A });
2246N/A
2246N/A charset("x-Big5-HKSCS-2001", "Big5_HKSCS_2001",
2246N/A new String[] {
2246N/A "Big5_HKSCS_2001",
2246N/A "big5hk-2001",
2246N/A "big5-hkscs-2001",
0N/A "big5-hkscs:unicode3.0",
2246N/A "big5hkscs-2001",
0N/A });
0N/A
0N/A charset("x-Big5-Solaris", "Big5_Solaris",
0N/A new String[] {
0N/A "Big5_Solaris", // JDK historical
0N/A });
0N/A
0N/A // Simplified Chinese
0N/A charset("GBK", "GBK",
0N/A new String[] {
0N/A "windows-936",
0N/A "CP936"
0N/A });
0N/A
0N/A charset("GB18030", "GB18030",
0N/A new String[] {
0N/A "gb18030-2000"
0N/A });
0N/A
0N/A charset("GB2312", "EUC_CN",
0N/A new String[] {
0N/A // IANA aliases
0N/A "gb2312",
0N/A "gb2312-80",
0N/A "gb2312-1980",
0N/A "euc-cn",
0N/A "euccn",
0N/A "x-EUC-CN", // 1.4 compatability
0N/A "EUC_CN" //JDK historical
0N/A });
0N/A
0N/A charset("x-mswin-936", "MS936",
0N/A new String[] {
0N/A "ms936", // historical
0N/A // IANA aliases
0N/A "ms_936"
0N/A });
0N/A
0N/A // The definition of this charset may be overridden by the init method,
0N/A // below, if the sun.nio.cs.map property is defined.
0N/A //
0N/A charset("Shift_JIS", "SJIS",
0N/A new String[] {
0N/A // IANA aliases
0N/A "sjis", // historical
0N/A "shift_jis",
0N/A "shift-jis",
0N/A "ms_kanji",
0N/A "x-sjis",
0N/A "csShiftJIS"
0N/A });
0N/A
0N/A // The definition of this charset may be overridden by the init method,
0N/A // below, if the sun.nio.cs.map property is defined.
0N/A //
0N/A charset("windows-31j", "MS932",
0N/A new String[] {
0N/A "MS932", // JDK historical
0N/A "windows-932",
0N/A "csWindows31J"
0N/A });
0N/A
0N/A charset("JIS_X0201", "JIS_X_0201",
0N/A new String[] {
0N/A "JIS0201", // JDK historical
0N/A // IANA aliases
0N/A "JIS_X0201",
0N/A "X0201",
0N/A "csHalfWidthKatakana"
0N/A });
0N/A
0N/A charset("x-JIS0208", "JIS_X_0208",
0N/A new String[] {
0N/A "JIS0208", // JDK historical
0N/A // IANA aliases
0N/A "JIS_C6226-1983",
0N/A "iso-ir-87",
0N/A "x0208",
0N/A "JIS_X0208-1983",
0N/A "csISO87JISX0208"
0N/A });
0N/A
0N/A charset("JIS_X0212-1990", "JIS_X_0212",
0N/A new String[] {
0N/A "JIS0212", // JDK historical
0N/A // IANA aliases
0N/A "jis_x0212-1990",
0N/A "x0212",
0N/A "iso-ir-159",
0N/A "csISO159JISX02121990"
0N/A });
0N/A
177N/A charset("x-SJIS_0213", "SJIS_0213",
177N/A new String[] {
177N/A "sjis-0213",
177N/A "sjis_0213",
177N/A "sjis:2004",
177N/A "sjis_0213:2004",
177N/A "shift_jis_0213:2004",
177N/A "shift_jis:2004"
177N/A });
177N/A
177N/A charset("x-MS932_0213", "MS932_0213",
177N/A new String[] {
177N/A "MS932-0213",
177N/A "MS932_0213",
177N/A "MS932:2004",
177N/A "windows-932-0213",
177N/A "windows-932:2004"
177N/A });
177N/A
0N/A charset("EUC-JP", "EUC_JP",
0N/A new String[] {
0N/A "euc_jp", // JDK historical
0N/A // IANA aliases
0N/A "eucjis",
0N/A "eucjp",
0N/A "Extended_UNIX_Code_Packed_Format_for_Japanese",
0N/A "csEUCPkdFmtjapanese",
0N/A "x-euc-jp",
0N/A "x-eucjp"
0N/A });
0N/A
0N/A charset("x-euc-jp-linux", "EUC_JP_LINUX",
0N/A new String[] {
0N/A "euc_jp_linux", // JDK historical
0N/A "euc-jp-linux"
0N/A });
0N/A
0N/A charset("x-eucjp-open", "EUC_JP_Open",
0N/A new String[] {
0N/A "EUC_JP_Solaris", // JDK historical
0N/A "eucJP-open"
0N/A });
0N/A
0N/A charset("x-PCK", "PCK",
0N/A new String[] {
0N/A // IANA aliases
0N/A "pck" // historical
0N/A });
0N/A
0N/A charset("ISO-2022-JP", "ISO2022_JP",
0N/A new String[] {
0N/A // IANA aliases
0N/A "iso2022jp", // historical
0N/A "jis",
0N/A "csISO2022JP",
0N/A "jis_encoding",
0N/A "csjisencoding"
0N/A });
0N/A
0N/A charset("ISO-2022-JP-2", "ISO2022_JP_2",
0N/A new String[] {
0N/A // IANA aliases
0N/A "csISO2022JP2",
0N/A "iso2022jp2"
0N/A });
0N/A
0N/A charset("x-windows-50221", "MS50221",
0N/A new String[] {
0N/A "ms50221", // historical
0N/A "cp50221",
0N/A });
0N/A
0N/A charset("x-windows-50220", "MS50220",
0N/A new String[] {
0N/A "ms50220", // historical
0N/A "cp50220",
0N/A });
0N/A
0N/A charset("x-windows-iso2022jp", "MSISO2022JP",
0N/A new String[] {
0N/A "windows-iso2022jp", // historical
0N/A });
0N/A
0N/A charset("x-JISAutoDetect", "JISAutoDetect",
0N/A new String[] {
0N/A "JISAutoDetect" // historical
0N/A });
0N/A
0N/A // Korean
0N/A charset("EUC-KR", "EUC_KR",
0N/A new String[] {
0N/A "euc_kr", // JDK historical
0N/A // IANA aliases
0N/A "ksc5601",
0N/A "euckr",
0N/A "ks_c_5601-1987",
0N/A "ksc5601-1987",
0N/A "ksc5601_1987",
0N/A "ksc_5601",
0N/A "csEUCKR",
0N/A "5601"
0N/A });
0N/A
0N/A charset("x-windows-949", "MS949",
0N/A new String[] {
0N/A "ms949", // JDK historical
0N/A "windows949",
0N/A "windows-949",
0N/A // IANA aliases
0N/A "ms_949"
0N/A });
0N/A
0N/A charset("x-Johab", "Johab",
0N/A new String[] {
0N/A "ksc5601-1992",
0N/A "ksc5601_1992",
0N/A "ms1361",
0N/A "johab" // JDK historical
0N/A });
0N/A
0N/A charset("ISO-2022-KR", "ISO2022_KR",
0N/A new String[] {
0N/A "ISO2022KR", // JDK historical
0N/A "csISO2022KR"
0N/A });
0N/A
0N/A charset("ISO-2022-CN", "ISO2022_CN",
0N/A new String[] {
0N/A "ISO2022CN", // JDK historical
0N/A "csISO2022CN"
0N/A });
0N/A
0N/A charset("x-ISO-2022-CN-CNS", "ISO2022_CN_CNS",
0N/A new String[] {
0N/A "ISO2022CN_CNS", // JDK historical
0N/A "ISO-2022-CN-CNS"
0N/A });
0N/A
0N/A charset("x-ISO-2022-CN-GB", "ISO2022_CN_GB",
0N/A new String[] {
0N/A "ISO2022CN_GB", // JDK historical
0N/A "ISO-2022-CN-GB"
0N/A });
0N/A
0N/A charset("x-ISCII91", "ISCII91",
0N/A new String[] {
0N/A "iscii",
0N/A "ST_SEV_358-88",
0N/A "iso-ir-153",
0N/A "csISO153GOST1976874",
0N/A "ISCII91" // JDK historical
0N/A });
0N/A
0N/A charset("ISO-8859-3", "ISO_8859_3",
0N/A new String[] {
0N/A "iso8859_3", // JDK historical
0N/A "8859_3",
0N/A "ISO_8859-3:1988",
0N/A "iso-ir-109",
0N/A "ISO_8859-3",
0N/A "ISO8859-3",
0N/A "latin3",
0N/A "l3",
0N/A "ibm913",
0N/A "ibm-913",
0N/A "cp913",
0N/A "913",
0N/A "csISOLatin3"
0N/A });
0N/A
0N/A charset("ISO-8859-6", "ISO_8859_6",
0N/A new String[] {
0N/A "iso8859_6", // JDK historical
0N/A "8859_6",
0N/A "iso-ir-127",
0N/A "ISO_8859-6",
0N/A "ISO_8859-6:1987",
0N/A "ISO8859-6",
0N/A "ECMA-114",
0N/A "ASMO-708",
0N/A "arabic",
0N/A "ibm1089",
0N/A "ibm-1089",
0N/A "cp1089",
0N/A "1089",
0N/A "csISOLatinArabic"
0N/A });
0N/A
0N/A charset("ISO-8859-8", "ISO_8859_8",
0N/A new String[] {
0N/A "iso8859_8", // JDK historical
0N/A "8859_8",
0N/A "iso-ir-138",
0N/A "ISO_8859-8",
0N/A "ISO_8859-8:1988",
0N/A "ISO8859-8",
0N/A "cp916",
0N/A "916",
0N/A "ibm916",
0N/A "ibm-916",
0N/A "hebrew",
0N/A "csISOLatinHebrew"
0N/A });
0N/A
0N/A charset("x-ISO-8859-11", "ISO_8859_11",
0N/A new String[] {
0N/A "iso-8859-11",
0N/A "iso8859_11"
0N/A });
0N/A
0N/A charset("TIS-620", "TIS_620",
0N/A new String[] {
0N/A "tis620", // JDK historical
0N/A "tis620.2533"
0N/A });
0N/A
0N/A // Various Microsoft Windows international codepages
0N/A
0N/A charset("windows-1255", "MS1255",
0N/A new String[] {
0N/A "cp1255" // JDK historical
0N/A });
0N/A
0N/A charset("windows-1256", "MS1256",
0N/A new String[] {
0N/A "cp1256" // JDK historical
0N/A });
0N/A
0N/A charset("windows-1258", "MS1258",
0N/A new String[] {
0N/A "cp1258" // JDK historical
0N/A });
0N/A
0N/A // IBM & PC/MSDOS encodings
0N/A
0N/A charset("x-IBM942", "IBM942",
0N/A new String[] {
0N/A "cp942", // JDK historical
0N/A "ibm942",
0N/A "ibm-942",
0N/A "942"
0N/A });
0N/A
0N/A charset("x-IBM942C", "IBM942C",
0N/A new String[] {
0N/A "cp942C", // JDK historical
0N/A "ibm942C",
0N/A "ibm-942C",
0N/A "942C"
0N/A });
0N/A
0N/A charset("x-IBM943", "IBM943",
0N/A new String[] {
0N/A "cp943", // JDK historical
0N/A "ibm943",
0N/A "ibm-943",
0N/A "943"
0N/A });
0N/A
0N/A charset("x-IBM943C", "IBM943C",
0N/A new String[] {
0N/A "cp943C", // JDK historical
0N/A "ibm943C",
0N/A "ibm-943C",
0N/A "943C"
0N/A });
0N/A
0N/A charset("x-IBM948", "IBM948",
0N/A new String[] {
0N/A "cp948", // JDK historical
0N/A "ibm948",
0N/A "ibm-948",
0N/A "948"
0N/A });
0N/A
0N/A charset("x-IBM950", "IBM950",
0N/A new String[] {
0N/A "cp950", // JDK historical
0N/A "ibm950",
0N/A "ibm-950",
0N/A "950"
0N/A });
0N/A
0N/A charset("x-IBM930", "IBM930",
0N/A new String[] {
0N/A "cp930", // JDK historical
0N/A "ibm930",
0N/A "ibm-930",
0N/A "930"
0N/A });
0N/A
0N/A charset("x-IBM935", "IBM935",
0N/A new String[] {
0N/A "cp935", // JDK historical
0N/A "ibm935",
0N/A "ibm-935",
0N/A "935"
0N/A });
0N/A
0N/A charset("x-IBM937", "IBM937",
0N/A new String[] {
0N/A "cp937", // JDK historical
0N/A "ibm937",
0N/A "ibm-937",
0N/A "937"
0N/A });
0N/A
0N/A charset("x-IBM856", "IBM856",
0N/A new String[] {
0N/A "cp856", // JDK historical
0N/A "ibm-856",
0N/A "ibm856",
0N/A "856"
0N/A });
0N/A
0N/A charset("IBM860", "IBM860",
0N/A new String[] {
0N/A "cp860", // JDK historical
0N/A "ibm860",
0N/A "ibm-860",
0N/A "860",
0N/A "csIBM860"
0N/A });
0N/A charset("IBM861", "IBM861",
0N/A new String[] {
0N/A "cp861", // JDK historical
0N/A "ibm861",
0N/A "ibm-861",
0N/A "861",
0N/A "csIBM861",
0N/A "cp-is"
0N/A });
0N/A
0N/A charset("IBM863", "IBM863",
0N/A new String[] {
0N/A "cp863", // JDK historical
0N/A "ibm863",
0N/A "ibm-863",
0N/A "863",
0N/A "csIBM863"
0N/A });
0N/A
0N/A charset("IBM864", "IBM864",
0N/A new String[] {
0N/A "cp864", // JDK historical
0N/A "ibm864",
0N/A "ibm-864",
0N/A "864",
0N/A "csIBM864"
0N/A });
0N/A
0N/A charset("IBM865", "IBM865",
0N/A new String[] {
0N/A "cp865", // JDK historical
0N/A "ibm865",
0N/A "ibm-865",
0N/A "865",
0N/A "csIBM865"
0N/A });
0N/A
0N/A charset("IBM868", "IBM868",
0N/A new String[] {
0N/A "cp868", // JDK historical
0N/A "ibm868",
0N/A "ibm-868",
0N/A "868",
0N/A "cp-ar",
0N/A "csIBM868"
0N/A });
0N/A
0N/A charset("IBM869", "IBM869",
0N/A new String[] {
0N/A "cp869", // JDK historical
0N/A "ibm869",
0N/A "ibm-869",
0N/A "869",
0N/A "cp-gr",
0N/A "csIBM869"
0N/A });
0N/A
0N/A charset("x-IBM921", "IBM921",
0N/A new String[] {
0N/A "cp921", // JDK historical
0N/A "ibm921",
0N/A "ibm-921",
0N/A "921"
0N/A });
0N/A
0N/A charset("x-IBM1006", "IBM1006",
0N/A new String[] {
0N/A "cp1006", // JDK historical
0N/A "ibm1006",
0N/A "ibm-1006",
0N/A "1006"
0N/A });
0N/A
0N/A charset("x-IBM1046", "IBM1046",
0N/A new String[] {
0N/A "cp1046", // JDK historical
0N/A "ibm1046",
0N/A "ibm-1046",
0N/A "1046"
0N/A });
0N/A
0N/A charset("IBM1047", "IBM1047",
0N/A new String[] {
0N/A "cp1047", // JDK historical
0N/A "ibm-1047",
0N/A "1047"
0N/A });
0N/A
0N/A charset("x-IBM1098", "IBM1098",
0N/A new String[] {
0N/A "cp1098", // JDK historical
0N/A "ibm1098",
0N/A "ibm-1098",
0N/A "1098",
0N/A });
0N/A
0N/A charset("IBM037", "IBM037",
0N/A new String[] {
0N/A "cp037", // JDK historical
0N/A "ibm037",
0N/A "ebcdic-cp-us",
0N/A "ebcdic-cp-ca",
0N/A "ebcdic-cp-wt",
0N/A "ebcdic-cp-nl",
0N/A "csIBM037",
0N/A "cs-ebcdic-cp-us",
0N/A "cs-ebcdic-cp-ca",
0N/A "cs-ebcdic-cp-wt",
0N/A "cs-ebcdic-cp-nl",
0N/A "ibm-037",
0N/A "ibm-37",
0N/A "cpibm37",
0N/A "037"
0N/A });
0N/A
0N/A charset("x-IBM1025", "IBM1025",
0N/A new String[] {
0N/A "cp1025", // JDK historical
0N/A "ibm1025",
0N/A "ibm-1025",
0N/A "1025"
0N/A });
0N/A
0N/A charset("IBM1026", "IBM1026",
0N/A new String[] {
0N/A "cp1026", // JDK historical
0N/A "ibm1026",
0N/A "ibm-1026",
0N/A "1026"
0N/A });
0N/A
0N/A charset("x-IBM1112", "IBM1112",
0N/A new String[] {
0N/A "cp1112", // JDK historical
0N/A "ibm1112",
0N/A "ibm-1112",
0N/A "1112"
0N/A });
0N/A
0N/A charset("x-IBM1122", "IBM1122",
0N/A new String[] {
0N/A "cp1122", // JDK historical
0N/A "ibm1122",
0N/A "ibm-1122",
0N/A "1122"
0N/A });
0N/A
0N/A charset("x-IBM1123", "IBM1123",
0N/A new String[] {
0N/A "cp1123", // JDK historical
0N/A "ibm1123",
0N/A "ibm-1123",
0N/A "1123"
0N/A });
0N/A
0N/A charset("x-IBM1124", "IBM1124",
0N/A new String[] {
0N/A "cp1124", // JDK historical
0N/A "ibm1124",
0N/A "ibm-1124",
0N/A "1124"
0N/A });
0N/A
3766N/A charset("x-IBM1364", "IBM1364",
3766N/A new String[] {
3766N/A "cp1364",
3766N/A "ibm1364",
3766N/A "ibm-1364",
3766N/A "1364"
3766N/A });
3766N/A
0N/A charset("IBM273", "IBM273",
0N/A new String[] {
0N/A "cp273", // JDK historical
0N/A "ibm273",
0N/A "ibm-273",
0N/A "273"
0N/A });
0N/A
0N/A charset("IBM277", "IBM277",
0N/A new String[] {
0N/A "cp277", // JDK historical
0N/A "ibm277",
0N/A "ibm-277",
0N/A "277"
0N/A });
0N/A
0N/A charset("IBM278", "IBM278",
0N/A new String[] {
0N/A "cp278", // JDK historical
0N/A "ibm278",
0N/A "ibm-278",
0N/A "278",
0N/A "ebcdic-sv",
0N/A "ebcdic-cp-se",
0N/A "csIBM278"
0N/A });
0N/A
0N/A charset("IBM280", "IBM280",
0N/A new String[] {
0N/A "cp280", // JDK historical
0N/A "ibm280",
0N/A "ibm-280",
0N/A "280"
0N/A });
0N/A
0N/A charset("IBM284", "IBM284",
0N/A new String[] {
0N/A "cp284", // JDK historical
0N/A "ibm284",
0N/A "ibm-284",
0N/A "284",
0N/A "csIBM284",
0N/A "cpibm284"
0N/A });
0N/A
0N/A charset("IBM285", "IBM285",
0N/A new String[] {
0N/A "cp285", // JDK historical
0N/A "ibm285",
0N/A "ibm-285",
0N/A "285",
0N/A "ebcdic-cp-gb",
0N/A "ebcdic-gb",
0N/A "csIBM285",
0N/A "cpibm285"
0N/A });
0N/A
0N/A charset("IBM297", "IBM297",
0N/A new String[] {
0N/A "cp297", // JDK historical
0N/A "ibm297",
0N/A "ibm-297",
0N/A "297",
0N/A "ebcdic-cp-fr",
0N/A "cpibm297",
0N/A "csIBM297",
0N/A });
0N/A
0N/A charset("IBM420", "IBM420",
0N/A new String[] {
0N/A "cp420", // JDK historical
0N/A "ibm420",
0N/A "ibm-420",
0N/A "ebcdic-cp-ar1",
0N/A "420",
0N/A "csIBM420"
0N/A });
0N/A
0N/A charset("IBM424", "IBM424",
0N/A new String[] {
0N/A "cp424", // JDK historical
0N/A "ibm424",
0N/A "ibm-424",
0N/A "424",
0N/A "ebcdic-cp-he",
0N/A "csIBM424"
0N/A });
0N/A
0N/A charset("IBM500", "IBM500",
0N/A new String[] {
0N/A "cp500", // JDK historical
0N/A "ibm500",
0N/A "ibm-500",
0N/A "500",
0N/A "ebcdic-cp-ch",
0N/A "ebcdic-cp-bh",
0N/A "csIBM500"
0N/A });
0N/A
3108N/A charset("x-IBM833", "IBM833",
3108N/A new String[] {
3108N/A "cp833",
3108N/A "ibm833",
3108N/A "ibm-833"
3108N/A });
3108N/A
0N/A //EBCDIC DBCS-only Korean
0N/A charset("x-IBM834", "IBM834",
0N/A new String[] {
0N/A "cp834",
0N/A "ibm834",
715N/A "834",
0N/A "ibm-834"
0N/A });
0N/A
0N/A
0N/A charset("IBM-Thai", "IBM838",
0N/A new String[] {
0N/A "cp838", // JDK historical
0N/A "ibm838",
0N/A "ibm-838",
0N/A "838"
0N/A });
0N/A
0N/A charset("IBM870", "IBM870",
0N/A new String[] {
0N/A "cp870", // JDK historical
0N/A "ibm870",
0N/A "ibm-870",
0N/A "870",
0N/A "ebcdic-cp-roece",
0N/A "ebcdic-cp-yu",
0N/A "csIBM870"
0N/A });
0N/A
0N/A charset("IBM871", "IBM871",
0N/A new String[] {
0N/A "cp871", // JDK historical
0N/A "ibm871",
0N/A "ibm-871",
0N/A "871",
0N/A "ebcdic-cp-is",
0N/A "csIBM871"
0N/A });
0N/A
0N/A charset("x-IBM875", "IBM875",
0N/A new String[] {
0N/A "cp875", // JDK historical
0N/A "ibm875",
0N/A "ibm-875",
0N/A "875"
0N/A });
0N/A
0N/A charset("IBM918", "IBM918",
0N/A new String[] {
0N/A "cp918", // JDK historical
0N/A "ibm-918",
0N/A "918",
0N/A "ebcdic-cp-ar2"
0N/A });
0N/A
0N/A charset("x-IBM922", "IBM922",
0N/A new String[] {
0N/A "cp922", // JDK historical
0N/A "ibm922",
0N/A "ibm-922",
0N/A "922"
0N/A });
0N/A
0N/A charset("x-IBM1097", "IBM1097",
0N/A new String[] {
0N/A "cp1097", // JDK historical
0N/A "ibm1097",
0N/A "ibm-1097",
0N/A "1097"
0N/A });
0N/A
0N/A charset("x-IBM949", "IBM949",
0N/A new String[] {
0N/A "cp949", // JDK historical
0N/A "ibm949",
0N/A "ibm-949",
0N/A "949"
0N/A });
0N/A
0N/A charset("x-IBM949C", "IBM949C",
0N/A new String[] {
0N/A "cp949C", // JDK historical
0N/A "ibm949C",
0N/A "ibm-949C",
0N/A "949C"
0N/A });
0N/A
0N/A charset("x-IBM939", "IBM939",
0N/A new String[] {
0N/A "cp939", // JDK historical
0N/A "ibm939",
0N/A "ibm-939",
0N/A "939"
0N/A });
0N/A
0N/A charset("x-IBM933", "IBM933",
0N/A new String[] {
0N/A "cp933", // JDK historical
0N/A "ibm933",
0N/A "ibm-933",
0N/A "933"
0N/A });
0N/A
0N/A charset("x-IBM1381", "IBM1381",
0N/A new String[] {
0N/A "cp1381", // JDK historical
0N/A "ibm1381",
0N/A "ibm-1381",
0N/A "1381"
0N/A });
0N/A
0N/A charset("x-IBM1383", "IBM1383",
0N/A new String[] {
0N/A "cp1383", // JDK historical
0N/A "ibm1383",
0N/A "ibm-1383",
0N/A "1383"
0N/A });
0N/A
0N/A charset("x-IBM970", "IBM970",
0N/A new String[] {
0N/A "cp970", // JDK historical
0N/A "ibm970",
0N/A "ibm-970",
0N/A "ibm-eucKR",
0N/A "970"
0N/A });
0N/A
0N/A charset("x-IBM964", "IBM964",
0N/A new String[] {
0N/A "cp964", // JDK historical
0N/A "ibm964",
0N/A "ibm-964",
0N/A "964"
0N/A });
0N/A
0N/A charset("x-IBM33722", "IBM33722",
0N/A new String[] {
0N/A "cp33722", // JDK historical
0N/A "ibm33722",
0N/A "ibm-33722",
0N/A "ibm-5050", // from IBM alias list
0N/A "ibm-33722_vascii_vpua", // from IBM alias list
0N/A "33722"
0N/A });
0N/A
0N/A charset("IBM01140", "IBM1140",
0N/A new String[] {
0N/A "cp1140", // JDK historical
0N/A "ccsid01140",
0N/A "cp01140",
0N/A "1140",
518N/A "ebcdic-us-037+euro"
0N/A });
0N/A
0N/A charset("IBM01141", "IBM1141",
0N/A new String[] {
0N/A "cp1141", // JDK historical
0N/A "ccsid01141",
0N/A "cp01141",
0N/A "1141",
518N/A "ebcdic-de-273+euro"
0N/A });
0N/A
0N/A charset("IBM01142", "IBM1142",
0N/A new String[] {
0N/A "cp1142", // JDK historical
0N/A "ccsid01142",
0N/A "cp01142",
0N/A "1142",
518N/A "ebcdic-no-277+euro",
518N/A "ebcdic-dk-277+euro"
0N/A });
0N/A
0N/A charset("IBM01143", "IBM1143",
0N/A new String[] {
0N/A "cp1143", // JDK historical
0N/A "ccsid01143",
0N/A "cp01143",
0N/A "1143",
518N/A "ebcdic-fi-278+euro",
518N/A "ebcdic-se-278+euro"
0N/A });
0N/A
0N/A charset("IBM01144", "IBM1144",
0N/A new String[] {
0N/A "cp1144", // JDK historical
0N/A "ccsid01144",
0N/A "cp01144",
0N/A "1144",
518N/A "ebcdic-it-280+euro"
0N/A });
0N/A
0N/A charset("IBM01145", "IBM1145",
0N/A new String[] {
0N/A "cp1145", // JDK historical
0N/A "ccsid01145",
0N/A "cp01145",
0N/A "1145",
518N/A "ebcdic-es-284+euro"
0N/A });
0N/A
0N/A charset("IBM01146", "IBM1146",
0N/A new String[] {
0N/A "cp1146", // JDK historical
0N/A "ccsid01146",
0N/A "cp01146",
0N/A "1146",
518N/A "ebcdic-gb-285+euro"
0N/A });
0N/A
0N/A charset("IBM01147", "IBM1147",
0N/A new String[] {
0N/A "cp1147", // JDK historical
0N/A "ccsid01147",
0N/A "cp01147",
0N/A "1147",
518N/A "ebcdic-fr-277+euro"
0N/A });
0N/A
0N/A charset("IBM01148", "IBM1148",
0N/A new String[] {
0N/A "cp1148", // JDK historical
0N/A "ccsid01148",
0N/A "cp01148",
0N/A "1148",
518N/A "ebcdic-international-500+euro"
0N/A });
0N/A
0N/A charset("IBM01149", "IBM1149",
0N/A new String[] {
0N/A "cp1149", // JDK historical
0N/A "ccsid01149",
0N/A "cp01149",
0N/A "1149",
518N/A "ebcdic-s-871+euro"
0N/A });
0N/A
0N/A // Macintosh MacOS/Apple char encodingd
0N/A
0N/A
0N/A charset("x-MacRoman", "MacRoman",
0N/A new String[] {
0N/A "MacRoman" // JDK historical
0N/A });
0N/A
0N/A charset("x-MacCentralEurope", "MacCentralEurope",
0N/A new String[] {
0N/A "MacCentralEurope" // JDK historical
0N/A });
0N/A
0N/A charset("x-MacCroatian", "MacCroatian",
0N/A new String[] {
0N/A "MacCroatian" // JDK historical
0N/A });
0N/A
0N/A
0N/A charset("x-MacGreek", "MacGreek",
0N/A new String[] {
0N/A "MacGreek" // JDK historical
0N/A });
0N/A
0N/A charset("x-MacCyrillic", "MacCyrillic",
0N/A new String[] {
0N/A "MacCyrillic" // JDK historical
0N/A });
0N/A
0N/A charset("x-MacUkraine", "MacUkraine",
0N/A new String[] {
0N/A "MacUkraine" // JDK historical
0N/A });
0N/A
0N/A charset("x-MacTurkish", "MacTurkish",
0N/A new String[] {
0N/A "MacTurkish" // JDK historical
0N/A });
0N/A
0N/A charset("x-MacArabic", "MacArabic",
0N/A new String[] {
0N/A "MacArabic" // JDK historical
0N/A });
0N/A
0N/A charset("x-MacHebrew", "MacHebrew",
0N/A new String[] {
0N/A "MacHebrew" // JDK historical
0N/A });
0N/A
0N/A charset("x-MacIceland", "MacIceland",
0N/A new String[] {
0N/A "MacIceland" // JDK historical
0N/A });
0N/A
0N/A charset("x-MacRomania", "MacRomania",
0N/A new String[] {
0N/A "MacRomania" // JDK historical
0N/A });
0N/A
0N/A charset("x-MacThai", "MacThai",
0N/A new String[] {
0N/A "MacThai" // JDK historical
0N/A });
0N/A
0N/A charset("x-MacSymbol", "MacSymbol",
0N/A new String[] {
0N/A "MacSymbol" // JDK historical
0N/A });
0N/A
0N/A charset("x-MacDingbat", "MacDingbat",
0N/A new String[] {
0N/A "MacDingbat" // JDK historical
0N/A });
0N/A
0N/A instance = this;
0N/A
0N/A }
0N/A
0N/A private boolean initialized = false;
0N/A
0N/A // If the sun.nio.cs.map property is defined on the command line we won't
0N/A // see it in the system-properties table until after the charset subsystem
0N/A // has been initialized. We therefore delay the effect of this property
0N/A // until after the JRE has completely booted.
0N/A //
0N/A // At the moment following values for this property are supported, property
0N/A // value string is case insensitive.
0N/A //
0N/A // (1)"Windows-31J/Shift_JIS"
0N/A // In 1.4.1 we added a correct implementation of the Shift_JIS charset
0N/A // but in previous releases this charset name had been treated as an alias
0N/A // for Windows-31J, aka MS932. Users who have existing code that depends
0N/A // upon this alias can restore the previous behavior by defining this
0N/A // property to have this value.
0N/A //
0N/A // (2)"x-windows-50221/ISO-2022-JP"
0N/A // "x-windows-50220/ISO-2022-JP"
0N/A // "x-windows-iso2022jp/ISO-2022-JP"
0N/A // The charset ISO-2022-JP is a "standard based" implementation by default,
0N/A // which supports ASCII, JIS_X_0201 and JIS_X_0208 mappings based encoding
0N/A // and decoding only.
0N/A // There are three Microsoft iso-2022-jp variants, namely x-windows-50220,
0N/A // x-windows-50221 and x-windows-iso2022jp which behaves "slightly" differently
0N/A // compared to the "standard based" implementation. See ISO2022_JP.java for
0N/A // detailed description. Users who prefer the behavior of MS iso-2022-jp
0N/A // variants should use these names explicitly instead of using "ISO-2022-JP"
0N/A // and its aliases. However for those who need the ISO-2022-JP charset behaves
0N/A // exactly the same as MS variants do, above properties can be defined to
0N/A // switch.
0N/A //
0N/A // If we need to define other charset-alias mappings in the future then
0N/A // this property could be further extended, the general idea being that its
0N/A // value should be of the form
0N/A //
0N/A // new-charset-1/old-charset-1,new-charset-2/old-charset-2,...
0N/A //
0N/A // where each charset named to the left of a slash is intended to replace
0N/A // (most) uses of the charset named to the right of the slash.
0N/A //
0N/A protected void init() {
0N/A if (initialized)
0N/A return;
0N/A if (!sun.misc.VM.isBooted())
0N/A return;
0N/A
0N/A String map = AccessController.doPrivileged(
0N/A new GetPropertyAction("sun.nio.cs.map"));
0N/A boolean sjisIsMS932 = false;
0N/A boolean iso2022jpIsMS50221 = false;
0N/A boolean iso2022jpIsMS50220 = false;
0N/A boolean iso2022jpIsMSISO2022JP = false;
0N/A if (map != null) {
0N/A String[] maps = map.split(",");
0N/A for (int i = 0; i < maps.length; i++) {
0N/A if (maps[i].equalsIgnoreCase("Windows-31J/Shift_JIS")) {
0N/A sjisIsMS932 = true;
0N/A } else if (maps[i].equalsIgnoreCase("x-windows-50221/ISO-2022-JP")) {
0N/A iso2022jpIsMS50221 = true;
0N/A } else if (maps[i].equalsIgnoreCase("x-windows-50220/ISO-2022-JP")) {
0N/A iso2022jpIsMS50220 = true;
0N/A } else if (maps[i].equalsIgnoreCase("x-windows-iso2022jp/ISO-2022-JP")) {
0N/A iso2022jpIsMSISO2022JP = true;
0N/A }
0N/A }
0N/A }
0N/A if (sjisIsMS932) {
0N/A deleteCharset("Shift_JIS",
0N/A new String[] {
0N/A // IANA aliases
0N/A "sjis", // historical
0N/A "shift_jis",
0N/A "shift-jis",
0N/A "ms_kanji",
0N/A "x-sjis",
0N/A "csShiftJIS"
0N/A });
0N/A deleteCharset("windows-31j",
0N/A new String[] {
0N/A "MS932", // JDK historical
0N/A "windows-932",
0N/A "csWindows31J"
0N/A });
0N/A charset("Shift_JIS", "SJIS",
0N/A new String[] {
0N/A // IANA aliases
0N/A "sjis" // JDK historical
0N/A });
0N/A charset("windows-31j", "MS932",
0N/A new String[] {
0N/A "MS932", // JDK historical
0N/A "windows-932",
0N/A "csWindows31J",
0N/A "shift-jis",
0N/A "ms_kanji",
0N/A "x-sjis",
0N/A "csShiftJIS",
0N/A // This alias takes precedence over the actual
0N/A // Shift_JIS charset itself since aliases are always
0N/A // resolved first, before looking up canonical names.
0N/A "shift_jis"
0N/A });
0N/A }
0N/A if (iso2022jpIsMS50221 ||
0N/A iso2022jpIsMS50220 ||
0N/A iso2022jpIsMSISO2022JP) {
0N/A deleteCharset("ISO-2022-JP",
0N/A new String[] {
0N/A "iso2022jp",
0N/A "jis",
0N/A "csISO2022JP",
0N/A "jis_encoding",
0N/A "csjisencoding"
0N/A });
0N/A if (iso2022jpIsMS50221) {
0N/A deleteCharset("x-windows-50221",
0N/A new String[] {
0N/A "cp50221",
0N/A "ms50221"
0N/A });
0N/A charset("x-windows-50221", "MS50221",
0N/A new String[] {
0N/A "cp50221",
0N/A "ms50221",
0N/A "iso-2022-jp",
0N/A "iso2022jp",
0N/A "jis",
0N/A "csISO2022JP",
0N/A "jis_encoding",
0N/A "csjisencoding"
0N/A });
0N/A } else if (iso2022jpIsMS50220) {
0N/A deleteCharset("x-windows-50220",
0N/A new String[] {
0N/A "cp50220",
0N/A "ms50220"
0N/A });
0N/A charset("x-windows-50220", "MS50220",
0N/A new String[] {
0N/A "cp50220",
0N/A "ms50220",
0N/A "iso-2022-jp",
0N/A "iso2022jp",
0N/A "jis",
0N/A "csISO2022JP",
0N/A "jis_encoding",
0N/A "csjisencoding"
0N/A });
0N/A } else {
0N/A deleteCharset("x-windows-iso2022jp",
0N/A new String[] {
0N/A "windows-iso2022jp"
0N/A });
0N/A charset("x-windows-iso2022jp", "MSISO2022JP",
0N/A new String[] {
0N/A "windows-iso2022jp",
0N/A "iso-2022-jp",
0N/A "iso2022jp",
0N/A "jis",
0N/A "csISO2022JP",
0N/A "jis_encoding",
0N/A "csjisencoding"
0N/A });
0N/A
0N/A
0N/A }
0N/A }
0N/A String osName = AccessController.doPrivileged(
0N/A new GetPropertyAction("os.name"));
4775N/A if ("SunOS".equals(osName) || "Linux".equals(osName)
4944N/A || osName.contains("OS X")) {
0N/A charset("x-COMPOUND_TEXT", "COMPOUND_TEXT",
0N/A new String[] {
0N/A "COMPOUND_TEXT", // JDK historical
0N/A "x11-compound_text",
0N/A "x-compound-text"
0N/A });
0N/A }
0N/A initialized = true;
0N/A }
0N/A
0N/A public static String[] aliasesFor(String charsetName) {
0N/A if (instance == null)
0N/A return null;
0N/A return instance.aliases(charsetName);
0N/A }
0N/A}