달력

4

« 2024/4 »

  • 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
2010. 11. 11. 15:37

Java String charset 바꾸기 I.lib()/I.lib(Unix)2010. 11. 11. 15:37

.. .. ..

/*address = new String(info.getAddress().getBytes("ISO-8859-1"), "UTF-8");
   System.out.println(address.getBytes());
   System.out.println("ISO-8859-1 => UTF-8 : "+new String(address.getBytes("ISO-8859-1"), "UTF-8"));
   System.out.println("ISO-8859-1 => EUC-KR : "+new String(address.getBytes("ISO-8859-1"), "EUC-KR"));
   System.out.println("ISO-8859-1 => ISO-8859-1 : "+new String(address.getBytes("ISO-8859-1"), "ISO-8859-1"));
   System.out.println("ISO-8859-1 => MS949 : "+new String(address.getBytes("ISO-8859-1"), "MS949"));
   System.out.println("UTF-8 => UTF-8 : "+new String(address.getBytes("UTF-8"), "UTF-8"));
   System.out.println("UTF-8 => EUC-KR : "+new String(address.getBytes("UTF-8"), "EUC-KR"));
   System.out.println("UTF-8 => ISO-8859-1 : "+new String(address.getBytes("UTF-8"), "ISO-8859-1"));
   System.out.println("UTF-8 => MS949 : "+new String(address.getBytes("UTF-8"), "MS949"));
   System.out.println("EUC-KR => UTF-8 : "+new String(address.getBytes("EUC-KR"), "UTF-8"));
   System.out.println("EUC-KR => EUC-KR : "+new String(address.getBytes("EUC-KR"), "EUC-KR"));
   System.out.println("EUC-KR => ISO-8859-1 : "+new String(address.getBytes("EUC-KR"), "ISO-8859-1"));
   System.out.println("EUC-KR => MS949 : "+new String(address.getBytes("EUC-KR"), "MS949"));
   System.out.println("MS949 => UTF-8 : "+new String(address.getBytes("MS949"), "UTF-8"));
   System.out.println("MS949 => EUC-KR : "+new String(address.getBytes("MS949"), "EUC-KR"));
   System.out.println("MS949 => ISO-8859-1 : "+new String(address.getBytes("MS949"), "ISO-8859-1"));
   System.out.println("MS949 => MS949 : "+new String(address.getBytes("MS949"), "MS949"));*/

'I.lib() > I.lib(Unix)' 카테고리의 다른 글

rm -rf 복구 방법  (0) 2011.06.03
아파치 & 톰켓 실행 순서 및 확인.  (1) 2011.02.07
VI로 문자열 바꾸기.  (0) 2010.11.04
Crontab 설정  (0) 2010.10.11
REDHAT VERSION (버젼) 정보  (0) 2010.07.30
.
:
Posted by .07274.