1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | String word ="인코딩 문제인가? 이클립스 문제인가? WAS문제 인가 그것이 알고 싶다...."; System.out.println("utf-8 -> euc-kr : " +new String(word.getBytes("utf-8"),"euc-kr")); System.out.println("utf-8 -> ksc5601 : " +new String(word.getBytes("utf-8"),"ksc5601")); System.out.println("utf-8 -> x-windows-949 : " +new String(word.getBytes("utf-8"),"x-windows-949")); System.out.println("utf-8 -> iso-8859-1 : " +new String(word.getBytes("utf-8"),"iso-8859-1")); System.out.println("iso-8859-1 -> euc-kr : " +new String(word.getBytes("iso-8859-1"),"euc-kr")); System.out.println("iso-8859-1 -> ksc5601 : " +new String(word.getBytes("iso-8859-1"),"ksc5601")); System.out.println("iso-8859-1 -> x-windows-949 : " +new String(word.getBytes("iso-8859-1"),"x-windows-949")); System.out.println("iso-8859-1 -> utf-8 : " +new String(word.getBytes("iso-8859-1"),"utf-8")); System.out.println("euc-kr -> utf-8 : " +new String(word.getBytes("euc-kr"),"utf-8")); System.out.println("euc-kr -> ksc5601 : " +new String(word.getBytes("euc-kr"),"ksc5601")); System.out.println("euc-kr -> x-windows-949 : " +new String(word.getBytes("euc-kr"),"x-windows-949")); System.out.println("euc-kr -> iso-8859-1 : " +new String(word.getBytes("euc-kr"),"iso-8859-1")); System.out.println("ksc5601 -> euc-kr : " +new String(word.getBytes("ksc5601"),"euc-kr")); System.out.println("ksc5601 -> utf-8 : " +new String(word.getBytes("ksc5601"),"utf-8")); System.out.println("ksc5601 -> x-windows-949 : " +new String(word.getBytes("ksc5601"),"x-windows-949")); System.out.println("ksc5601 -> iso-8859-1 : " +new String(word.getBytes("ksc5601"),"iso-8859-1")); System.out.println("x-windows-949 -> euc-kr : " +new String(word.getBytes("x-windows-949"),"euc-kr")); System.out.println("x-windows-949 -> utf-8 : " +new String(word.getBytes("x-windows-949"),"utf-8")); System.out.println("x-windows-949 -> ksc5601 : " +new String(word.getBytes("x-windows-949"),"ksc5601")); System.out.println("x-windows-949 -> iso-8859-1 : " +new String(word.getBytes("x-windows-949"),"iso-8859-1")); | cs |
'Java' 카테고리의 다른 글
Image JTable (이미지 변경 가능) (0) | 2019.07.13 |
---|---|
JTable에 이미지 넣기 (0) | 2019.07.13 |
[JAVA] Graphics > 자바 1.4 ImageIO를 이용한 JPG 이미지 저장 (0) | 2019.07.04 |
[Java] 장치관리자처럼 SerialPort 이름 가져오기 (0) | 2019.06.29 |