2004-11-06

자바에서 한글 처리

1. ISO-8859-1에서 KSC5601로

String before = ...
String after = new String(before.getBytes("8859_1"),"KSC5601");


2. properties 파일에서 한글 읽기
 
(1) 1. 번 방식 사용
 
(2) native2ascii 도구 사용

native2ascii Before.poroperties After.properties

 
3. 주의 사항
 
(1) 이클립스에서 properties 파일 관리
 
속성에서 encoding을 MS949로 변경