另:用String s=new String((rs.getString(3)).getBytes("ISO8859-1"),"gb2312");转就报Error 500错,用request.getCharacterEncoding()
得到的本地编码已经是gb2312,问题出在哪里呢?
希盼解答!

解决方案 »

  1.   

    String s=new String((rs.getString(3)).getBytes("ISO8859-1"),"gb2312");
    ->
    String s=new String((rs.getInt(3)).getBytes("ISO8859_1"),"gb2312");
      

  2.   

    To  zxhong(红):
    还是不行,报错int cannot be dereferenced
                    String s=new String((rs.getInt(3)).getBytes("ISO_8859_1"),"GBK"); //[ /test.jsp; Line: 29]
    改为String s=new String((rs.getString(3)).getBytes("ISO8859_1"),"gb2312");仍报错Err 500
                                        ^
      

  3.   

    String s=new String((rs.getString(3)).getBytes("ISO8859-1"),"gb2312");
    ->
    String s=new String((rs.getString(3)).getBytes("gb2312"),"GBK");
      

  4.   

    To lovexing(爱鱼盛):
    一样不行,照样error 500错误。
      

  5.   

    在连接数据库的字串中加上编码试试,例如:
    jdbc:sybase......useUnicode=true&characterEncoding=GBK
      

  6.   

    To zeeler(自乐):
    我写为jdbc:sybase:Tds:192.168.0.20:5000/testdb?useUnicode=true&characterEncoding=GBK
    仍然不行,是我写的不对吗?
      

  7.   

    该字段存在吗?用名称试试!是string类型的吗?
      

  8.   

    同意 lovexing(爱鱼盛) 的`
     
    *************************************************************
    欢迎大家前来《东方热讯》网站,这是由多个程序员自建的大型网上社区!
    http://www.easthot.net
    她必将会成为最大的网上专业社区!HellFire 
    **************************************************************
      

  9.   

    问题确实出在字符集编码上,只是不是iso8859,而是ecugb!
    改称ecugb后一切问题都解决了!
    但是仍谢谢各位。