/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* 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.
*/
/*
* This class is public in sun.io, so other sun.* packages (such as
* HotJava) can use it, without exposing it to java.*.
* Translates IANA encoding name to the string which is the part of
* converter class.
*/
/**
* @deprecated Replaced by {@link java.nio.charset}. THIS API WILL BE
* REMOVED IN J2SE 1.6.
*/
public class CharacterEncoding {
private static boolean sjisIsMS932;
private static volatile boolean installedAll;
static {
// Core encodings
// Standard encodings used on Solaris and Linux
// Windows encodings
}
// Emergency access to old converters
}
// need to use Locale.US so we can load ISO converters in tr_TR locale
installAll();
}
return val;
}
private static synchronized void installAll() {
if (!installedAll) {
} else {
sjisIsMS932 = false;
}
// MIBenum: 4
// MIBenum: 5
// MIBenum: 6
// MIBenum: 7
// MIBenum: 8
// MIBenum: 9
// MIBenum: 10
// MIBenum: 11
// MIBenum: 12
// MIBenum: ???
// MIBenum: ????
//For compatibility purpose
// MIBenum: 106
// Alias recommended in RFC 1641
// MIBenum: 1010
// MIBenum: 1000
// Per Unicode standard
// Used by drag-and-drop subsystem
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// MIBenum: 2011
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// "Cp850"
// MIBenum: 2009
// "Cp852"
// MIBenum: 2010
// "Cp855"
// MIBenum: 2046
// "Cp855"
// MIBenum: ???
// "Cp857"
// MIBenum: 2047
// "Cp860"
// MIBenum: 2048
// MIBenum: 2049
// MIBenum: 2013
// MIBenum: 2050
// MIBenum: 2051
// MIBenum: 2052
// MIBenum: ????
// MIBenum: ????
// MIBenum: 2054
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// MIBenum: ????
// Specialized auto-detection for Japanese charsets
// MIBenum: 16/39
// MIBenum: 17/2024
// JIS-defined Shift JIS
"SJIS"); // JIS name
if (sjisIsMS932) {
} else {
}
// MIBenum: 18
// Japanese EUC
"EUC_JP");
// For handing only JIS0202 and JIS0208 in linux
// MIBenum: 874
// MIBenum: 2250
// MIBenum: 2251
// MIBenum: 2252
// MIBenum: 2253
// MIBenum: 2254
// MIBenum: 2255
// MIBenum: 2256
// MIBenum: 2257
// MIBenum: 2258
// MIBenum: ????
// Russian KOI8-R
// Simplified Chinese
// Added for future compatibility, explicit mapping to Unicode 3.0
// Traditional Chinese
// Korean
//MIBenum: 37
// Thai
// X11 Compound Text
// Variants
installedAll = true;
}
}
/**
* For Solaris:
* always returns "PCK"
*
* For other platforms:
* method returns "MS932" if the file.encoding property value is "MS932"
* or an alias of "MS932"
* otherwise, "SJIS", regardless of its
* actual file.encoding value. This method is called from the JIS
* Auto Detect converter.
*/
new PrivilegedAction<String>() {
return "PCK";
}
else {
}
}
});
if (encodeName != null) {
return encodeName;
}
}
new PrivilegedAction<String>() {
return "eucJP-open";
else
return "EUC_JP";
}
});
return encodeName;
}
}