strvalue=new String(strvalue.getBytes("8859_1"),"GBK");

解决方案 »

  1.   

    确保源文件有这两句
    <%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    转换前打印一下
    安楼上的转化试试
      

  2.   

    up,up那句话加在哪里啊?怎么调用???
      

  3.   

    页面开头加<%@ page contentType="text/html; charset=gb2312" language="java"%>
    改web.xml里的内码设置,如utf-8改为gb2312
      

  4.   

    除了那些以外,还必须加入request.setCharacterEncoding("gb2312");在String name;之后