电脑自带画图工具在哪:如何获得本地系统字符编码类型

来源:百度文库 编辑:高校问答 时间:2024/05/06 02:29:20
我的系统是windows xp,请问高手怎么才能获得本地系统的字符编码类型。

import java.nio.charset.Charset;  
  
public class getDefaultCharset   
{  
    public static void main(String[] args)  
    {  
        //方法一:中文操作系统中打印GBK  
        System.out.println(System.getProperty("file.encoding"));  
          
        //方法二:中文操作系统中打印GBK  
        System.out.println(Charset.defaultCharset());  
    }  
}

开始。运行。chcp
你会得到一个数。
如936,那就是GBK简体中文
ANSI代码页为1252,日文代码页为932

查看---》编码---->(这里就是的了)