jsp页面中做了一个输入框,按用户姓名来查询,一般的汉字正常,但有些生僻字,
   输入后按提交按钮时,这个字就变成?了。如名字: 林学樑,江建俤 
   输入后按提交按钮就变成:林学?,江建?
设成:
<%@ page contentType="text/html; charset=GBK" %>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">

<%@ page contentType="text/html; charset=gb2312" %>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
都不行,这要怎么处理??

解决方案 »

  1.   

    设置一下 pageEncoding:
    <%@ page contentType="text/html; charset=GBK" pageEncoding="GBK"%>
    要还不行, 试下UTF-8要还不行, .... 楼下补充
      

  2.   

    你在服务器是如何获得这个提交的参数的?
    你是设置request.setCharacterEncoding("GBK")后再request.getParameter的吗?
      

  3.   

    我是用struts 
    String hao1 = clientinfoForm.getHao()
     获得这个提交的参数的?? 那要怎么处理??
      

  4.   

    做如下设置,问题就应该消失
    <%@ page contentType="text/html; charset=GB18030" %>
    <meta http-equiv="Content-Type" content="text/html; charset=GB18030">

    <%@ page contentType="text/html; charset=gb2312" %>
    <meta http-equiv="Content-Type" content="text/html; charset=GB18030">
      

  5.   

    谢谢 ChDw(米),我的问题解决了