본문 바로가기

일하랴 공부하랴/JSP&JAVA

한글타입 정리


매번 개발시에... 한글깨짐은 왜 발생하는 거야.. ㅜㅜ


 String a1 = new String(new String(tmp.getBytes("ISO-8859-1"),"KSC5601") );
 String a2 = new String(new String(tmp.getBytes("ISO-8859-1"),"US-ASCII") );
 String a3 = new String(new String(tmp.getBytes("ISO-8859-1"),"UTF-8") );


 String b1 = new String(new String(tmp.getBytes("UTF-8"),"ISO-8859-1") );
 String b2 = new String(new String(tmp.getBytes("UTF-8"),"KSC5601") );
 String b3 = new String(new String(tmp.getBytes("UTF-8"),"US-ASCII") );


 String c1 = new String(new String(tmp.getBytes("US-ASCII"),"UTF-8") );
 String c2 = new String(new String(tmp.getBytes("US-ASCII"),"ISO-8859-1") );
 String c3 = new String(new String(tmp.getBytes("US-ASCII"),"KSC5601") );


 String d1 = new String(new String(tmp.getBytes("KSC5601"),"US-ASCII") );
 String d2 = new String(new String(tmp.getBytes("KSC5601"),"UTF-8") );
 String d3 = new String(new String(tmp.getBytes("KSC5601"),"ISO-8859-1") );

 String e1 = new String(new String(tmp.getBytes("EUC-KR"),"US-ASCII") );
 String e2 = new String(new String(tmp.getBytes("EUC-KR"),"UTF-8") );
 String e3 = new String(new String(tmp.getBytes("EUC-KR"),"ISO-8859-1") );