62,616
社区成员
发帖
与我相关
我的任务
分享
import sun.security.action.GetPropertyAction;
import java.security.AccessController;;
public class UnicodeTest {
public static void main(String args[]){
UnicodeTest ut = new UnicodeTest();
ut.test();
}
private void test(){
GetPropertyAction gpa = new GetPropertyAction("file.encoding");
String ac = (String) AccessController.doPrivileged(gpa);
System.out.println(ac);
/*String a = "か";
byte[] abc = a.getBytes();
for(byte g : abc){
System.out.print(g);
}*/
}
}
System.getProperty("file.encoding")