cspark.net

Diary..

포토로그 마이가든





한글과 unicode의 변환 by Coder

// 유니코드를 한글코드로 변환
protected String uni2ksc (String Unicodestr) throws UnsupportedEncodingException {
return new String (Unicodestr.getBytes("8859_1"),"KSC5601");
}

// 한글코드를 유니코드로 변환
protected String ksc2uni(String str) throws UnsupportedEncodingException {
return new String( str.getBytes("KSC5601"), "8859_1");
}


당췌 이놈의 한글처리는 프로젝트마다 어떻게 매번 부딪히는건지 알수가 없다..
물론 같은패턴의 에러는 없다.항상 새로운 에러가 튀어나온다..-_-;;

트랙백

이 글과 관련된 글 쓰기 (트랙백 보내기)
TrackbackURL : http://cspark.net/tb/225542 [도움말]

덧글

댓글 입력 영역