为Charset.forName(String)编码CharsetNames

Jas*_*ing 6 java character-encoding

我有一个关于Charset.forName(String charsetName)的问题.有没有我可以参考的charsetNames列表?例如,对于UTF-8,我们使用"utf8"作为charsetName.WINDOWS-1252,GB18030等怎么样?

iBa*_*bur 5

Charset         Description

US-ASCII        Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the Unicode character set
ISO-8859-1      ISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1
UTF-8           Eight-bit UCS Transformation Format
UTF-16BE        Sixteen-bit UCS Transformation Format, big-endian byte order
UTF-16LE        Sixteen-bit UCS Transformation Format, little-endian byte order
UTF-16          Sixteen-bit UCS Transformation Format, byte order identified by an optional byte-order mark

参考:http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html