일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- jpa
- STS
- maven
- JavaScript
- Open Source
- Exception
- MSSQL
- Core Java
- JDBC
- 오픈소스
- Eclipse
- oracle
- 설정
- spring
- error
- Spring Boot
- Tomcat
- Python
- Source
- PostgreSQL
- Docker
- AJAX
- myBatis
- MySQL
- git
- ubuntu
- Thymeleaf
- SpringBoot
- IntelliJ
- 문서
- Today
- Total
목록Unicode (4)
헤르메스 LIFE
/** * 현재 oracle 7 버전대는 unicode 1.2를 사용하고, * oracle 8.1.5 버전부터 unicode 2.0을 사용합니다. * 그리고 jdk1.2버전은 unicode 2.0을 사용하지요 * 그래서 oracle 8.1.5에서 읽어들인 한글은 보이지만, * 7버전에서 읽어들인 한글은 unicode 버전차이로 ?표로 표시됩니다. * 때문에 oracle 7버전에서 한글을 지원받으려면 * DB에서 read할때는 unicode 1.2를 2.0으로, DB로 write할때는 unicode 2.0을 1.2로 * conversion 해주는 class를 만들어서 import하여 사용하면 됩니다. * * UniCode 1.2 을 UniCode 2.0 로 변환 * @param uni12 변환할 문자 (U..
/** * 현재 oracle 7 버전대는 unicode 1.2를 사용하고, * oracle 8.1.5 버전부터 unicode 2.0을 사용합니다. * 그리고 jdk1.2버전은 unicode 2.0을 사용하지요 * 그래서 oracle 8.1.5에서 읽어들인 한글은 보이지만, * 7버전에서 읽어들인 한글은 unicode 버전차이로 ?표로 표시됩니다. * 때문에 oracle 7버전에서 한글을 지원받으려면 * DB에서 read할때는 unicode 1.2를 2.0으로, DB로 write할때는 unicode 2.0을 1.2로 * conversion 해주는 class를 만들어서 import하여 사용하면 됩니다. * * UniCode 2.0 을 UniCode 1.2 로 변환 * @param uni20 변환할 문자 (U..
public class StringToUni { public static void main(String[] args) { String str = "아름다운"; StringBuffer strVal = new StringBuffer(); for(int i = 0; i < str.length();I++) { char c= str.charAt(i); strVal.append("\\u" + Integer.toHexString(c)); } System.out.println(strVal.toString()); // 결과 : \uc544\ub984\ub2e4\uc6b4 } }
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); // 결과 : 아름다운 } }