进行编码转换阿
  public String convertCH(String str)
  {
    String chr=str;
    try
    {
      if(chr!=null&&(!chr.equals("null")||!chr.equals("")))
      {
        chr=new String(chr.getBytes("iso-8859-1"),"gb2312");
      }
    }
    catch (Exception ex)
    {
      ex.printStackTrace();
    }
    return chr;
  }

解决方案 »

  1.   

    放到Linux上就没事,放到win2k就出现乱码,为什么?
    我用的是resin
      

  2.   

    没用。
    乱码为:ox474a50444.......
      

  3.   

    oracle 到jsp好像不用转码的啊,怎么回事?帮你up以下吧!
      

  4.   

    我用的也是ORACLE,需转化。
    <% @ page contentType="text/html";charset="gb2312" %>
    String = new String(chr.getBytes("8859_1"));
    可以显示的