개발관련/웹개발
자바 jvm의 디폴트 charset 찾기
규이
2009. 3. 13. 19:32
public class Hello {
public static void main(String args[]) throws Exception{
// not crossplateform safe
System.out.println(System.getProperty("file.encoding"));
// jdk1.4
System.out.println(
new java.io.OutputStreamWriter(
new java.io.ByteArrayOutputStream()).getEncoding()
);
// jdk1.5
System.out.println(java.nio.charset.Charset.defaultCharset().name());
}
}
위의 코드를 실행하믄 됨.
출처 : http://www.rgagnon.com/javadetails/java-0505.html