250x250
Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
Tags
- Source
- PostgreSQL
- git
- Core Java
- JDBC
- SpringBoot
- maven
- STS
- IntelliJ
- 오픈소스
- Docker
- MySQL
- oracle
- ubuntu
- MSSQL
- error
- AJAX
- Open Source
- Python
- spring
- Spring Boot
- Tomcat
- myBatis
- 설정
- Exception
- Eclipse
- JavaScript
- 문서
- Thymeleaf
- jpa
Archives
- Today
- Total
헤르메스 LIFE
한글 Encoding 확인 본문
728x90
try {
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" ) );
} catch ( UnsupportedEncodingException e ) {
System.out.println( "### 지원하지 않는 인코딩입니다." + e );
}
728x90
'Core Java' 카테고리의 다른 글
[Core Java] QRCode 출력 (0) | 2021.03.23 |
---|---|
[Core Java] HTML entity 코드 변환 (0) | 2021.03.23 |
[Jackson] ObjectMapper, String to Map, to List, Object to JSON (0) | 2021.01.31 |
[Core Java] RequestMap 출력 (0) | 2021.01.17 |
[Core Java] 람다식을 이용한 List 안에 Map 에서 데이터 찾기 (0) | 2021.01.05 |