헤르메스 LIFE

[Source] Unicode To String 본문

Core Java

[Source] Unicode To String

헤르메스의날개 2010. 10. 20. 15:27
728x90
import java.io.UnsupportedEncodingException;

public class UniToString {
    public static void main(String[] args) {
        String hexStr = "\uc544\ub984\ub2e4\uc6b4"; 
        
        String ls = null;
        try {
            ls = new String(hexStr.getBytes(), "UTF-8");
        } catch(UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        System.out.println(ls);   // 결과 : 아름다운
    }
}
728x90

'Core Java' 카테고리의 다른 글

[Source] Unicode 2.0 을 Unicode 1.2 로 변환  (0) 2010.10.20
[Source] Character Set Conversion  (0) 2010.10.20
[Source] String to Unicode  (0) 2010.10.20
[Source] CVS 폴더 삭제  (0) 2010.09.06
[Source] FTP Client Source  (0) 2010.07.30