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">
都不行,这要怎么处理??
输入后按提交按钮时,这个字就变成?了。如名字: 林学樑,江建俤
输入后按提交按钮就变成:林学?,江建?
设成:
<%@ 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">
都不行,这要怎么处理??
<%@ page contentType="text/html; charset=GBK" pageEncoding="GBK"%>
要还不行, 试下UTF-8要还不行, .... 楼下补充
你是设置request.setCharacterEncoding("GBK")后再request.getParameter的吗?
String hao1 = clientinfoForm.getHao()
获得这个提交的参数的?? 那要怎么处理??
<%@ 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">