about encoding convertion from ISO8859-1 to GBK
807607Dec 14 2006 — edited Jan 19 2007Hi,
i tried to convert a string of 000"testline"111 from iso8859-1 to gbk.
here is the code:
// db stores data in iso8859 encoding
String contractname = rs.getString("contractname");
// change it to gbk
String contractnamegbk = new String(contractname.getBytes("ISO8859-1"),"GBK");
my test page uses GBK charset
and when i display it on the page using <%=contractnamegbk %>
it only shows me 000 missing the "testline"111
anyone knows what the problem is?
thanks very much