기술지원 문의
Re:화일에서 읽은 한글문제
이동익 / 2003-07-25 00:00
if( fr.read(bt,0,4) != -1 ){
round = new String(bt,0,2);
round = new String(round.getBytes(\"KSC5601\"), \"8859_1\");
}
이렇게 해보세요.
--정용희 님의 글 [2003-07-24 10:34:04]
>test.txt의 내용은 \"진행\"이라는 글자가 들어 있습니다
--------------------------------------------
byte bt[] = new byte[4];
String round = \"\";
DataInputStream fr = new DataInputStream(new BufferedInputStream(new FileInputStream(\"/test.txt\")));
if( fr.read(bt,0,4) != -1 ){
round = new String(bt,0,2);
}
round += \"한글\";
fr.close();
-----------------------
public String getRound(){
return reund;
}
--------------------------
위와 같은 형태로 bean를 작성하여 compile해서 jsp에서 불렀습니다.
그런데 getRound()를 출력하면 결과는
\"?ø??한글\" 와 같이 출력 됩니다.
\"진행한글\"이라고 출력 되어야 하는데 말입니다.
화일에서 읽은 값은 한글로 표시되지 않고 께집니다
어떠게 처리 해야 하나요
}