用这个request.setCharacterEncoding("gb2312")设置一下编码,这个方法放在jsp的第一行.

解决方案 »

  1.   

    byte []titl = title.getBytes();
    这行改为
    byte []titl = title.getBytes("ISO-8859-1");
      

  2.   

    偶的中文问题在这个版问了好几天都没有解决,最后是 google 到这篇文章才解决的。楼主可移步去看看。http://gceclub.sun.com.cn/NASApp/sme/jive/thread.jsp?forum=8&thread=13425
      

  3.   

    如果页面是gbk
    数据库也是gbk
    则request.setCharacterEncoding("gb2312")
    然后request.getParameter("title"); 
    这样应该没有问题。最好还是在web.xml增加过滤器。
      

  4.   

    <%@ page contentType="text/html; charset="GB2312" %>
      

  5.   


    上面的有点问题
    则request.setCharacterEncoding("gb2312")改成则request.setCharacterEncoding("gbk")