Java支持哪些字符集

 import java.nio.charset.Charset; import java.util.Iterator; import java.util.Set; public class javaCode { public static void main(String args[]) { Set charsetNames = Charset.availableCharsets().keySet(); System.out.println("-----the number of jdk1.67's charset is "+charsetNames.size()+"-----"); for (Iterator it = charsetNames.iterator(); it.hasNext();) { String charsetName = (String) it.next(); System.out.println(charsetName); } } }


 执行结果

-----the number of jdk1.67's charset is 160-----
Big5
Big5-HKSCS
EUC-JP
EUC-KR
GB18030
GB2312
GBK
IBM-Thai
IBM00858
IBM01140
IBM01141
IBM01142
IBM01143
IBM01144
IBM01145
IBM01146
IBM01147
IBM01148
IBM01149
IBM037
IBM1026
IBM1047
IBM2

你可能感兴趣的:(字符与编码,ibm,java,string,iterator,jdk,import)