查看java编码集

public class Test {
	
		  public static void main(String[] args) {
		        System.out.println("Default Charset=" + Charset.defaultCharset());
		        System.out.println("file.encoding=" + System.getProperty("file.encoding"));
		        System.out.println("Default Charset=" + Charset.defaultCharset());
		        System.out.println("Default Charset in Use=" + getDefaultCharSet());
		    }

		    private static String getDefaultCharSet() {
		        OutputStreamWriter writer = new OutputStreamWriter(new ByteArrayOutputStream());
		        String enc = writer.getEncoding();
		        return enc;
		    }

}

你可能感兴趣的:(java)