try:String sSourceString;
byte[] baByteArray = sSourceString.getBytes("GBK");
String sResult = new String(baByteArray,"ISO-8859-1");

解决方案 »

  1.   

    还是不行,但是我把oracle的charset改为GB2312,再往数据库中写数据,然后jsp显示的时候把oracle的charset改回ZHS16GBK,就可以正确显示。这该怎么办?
      

  2.   

    那你试一下String sSourceString;
    byte[] baByteArray = sSourceString.getBytes("ISO-8859-1");
    String sResult = new String(baByteArray,"GBK");
      

  3.   

    我和你一样碰到过,不过我解决了,那就是不要
    byte[] baByteArray = sSourceString.getBytes("ISO-8859-1");
    这一行代码,否则都会是?号,只需要在jsp中引入
    <%@ page contentType="text/html;charset=gb2312"%>并且在html中引入
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    就可以了,我用的oralce9i,没问题的