프로그램
[펌]java 인코딩 변환 한방에 해결
(주)CKBcorp.,
2014. 9. 27. 18:01
반응형
정규식을 이용해 아래와 같이 변환하면 한방에 테스트 할수 있습니다^-^b
하지만 정말 어쩔수 없을때만 아래와 같이 사용하고
프로젝트 초기라면 서버 인코딩 설정이나, Request 인코딩 설정 또는 DB 인코딩설정을 맞춰준후
작업하는것이 좋은거 같습니다.
하지만 정말 어쩔수 없을때만 아래와 같이 사용하고
프로젝트 초기라면 서버 인코딩 설정이나, Request 인코딩 설정 또는 DB 인코딩설정을 맞춰준후
작업하는것이 좋은거 같습니다.
o(new String(word.getBytes("utf-8"), "euc-kr"));
o(new String(word.getBytes("utf-8"), "ksc5601"));
o(new String(word.getBytes("utf-8"), "x-windows-949"));
o(new String(word.getBytes("utf-8"), "iso-8859-1"));
o(new String(word.getBytes("iso-8859-1"), "euc-kr"));
o(new String(word.getBytes("iso-8859-1"), "ksc5601"));
o(new String(word.getBytes("iso-8859-1"), "x-windows-949"));
o(new String(word.getBytes("iso-8859-1"), "utf-8"));
o(new String(word.getBytes("euc-kr"), "ksc5601"));
o(new String(word.getBytes("euc-kr"), "utf-8"));
o(new String(word.getBytes("euc-kr"), "x-windows-949"));
o(new String(word.getBytes("euc-kr"), "iso-8859-1"));
o(new String(word.getBytes("ksc5601"), "euc-kr"));
o(new String(word.getBytes("ksc5601"), "utf-8"));
o(new String(word.getBytes("ksc5601"), "x-windows-949"));
o(new String(word.getBytes("ksc5601"), "iso-8859-1"));
o(new String(word.getBytes("x-windows-949"), "euc-kr"));
o(new String(word.getBytes("x-windows-949"), "utf-8"));
o(new String(word.getBytes("x-windows-949"), "ksc5601"));
o(new String(word.getBytes("x-windows-949"), "iso-8859-1"));
o 는
java : System.out.println 으로 바꾸면 됨.
jsp : out.println 으로 바꾸면 됨
o(new String(word.getBytes("utf-8"), "ksc5601"));
o(new String(word.getBytes("utf-8"), "x-windows-949"));
o(new String(word.getBytes("utf-8"), "iso-8859-1"));
o(new String(word.getBytes("iso-8859-1"), "euc-kr"));
o(new String(word.getBytes("iso-8859-1"), "ksc5601"));
o(new String(word.getBytes("iso-8859-1"), "x-windows-949"));
o(new String(word.getBytes("iso-8859-1"), "utf-8"));
o(new String(word.getBytes("euc-kr"), "ksc5601"));
o(new String(word.getBytes("euc-kr"), "utf-8"));
o(new String(word.getBytes("euc-kr"), "x-windows-949"));
o(new String(word.getBytes("euc-kr"), "iso-8859-1"));
o(new String(word.getBytes("ksc5601"), "euc-kr"));
o(new String(word.getBytes("ksc5601"), "utf-8"));
o(new String(word.getBytes("ksc5601"), "x-windows-949"));
o(new String(word.getBytes("ksc5601"), "iso-8859-1"));
o(new String(word.getBytes("x-windows-949"), "euc-kr"));
o(new String(word.getBytes("x-windows-949"), "utf-8"));
o(new String(word.getBytes("x-windows-949"), "ksc5601"));
o(new String(word.getBytes("x-windows-949"), "iso-8859-1"));
o 는
java : System.out.println 으로 바꾸면 됨.
jsp : out.println 으로 바꾸면 됨
입력시작시간:
모바일 스크립트 :
반응형