还是中文问题 Stringname = new String(Stringname.getBytes("8859_1"),"gb2312")请试一试,如果不对,请见谅,因为我也是个新手 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 常用字符集: GBK,GB2312, UTF-6, ISO-8859-1 转换用户输入信息字符集 request.setCharacterEncoding(“UTF-8”); request.getParameter("value").getBytes("8859_1"),"gb2312"); 转换输出信息字符集 new String(str.getBytes("GB2312"),"ISO-8859-1"); new String(str.getBytes(" ISO-8859-1 "),“GBK"); request.setCharacterEncoding("UTF-8"); 读取数据库数据 str=new String(str.getBytes("GB2312")); 插入数据库数据 str=new String(str.getBytes("ISO-8859-1")); 就两句话,试试看<%response.setContentType("text/html;charset=gb2312");request.setCharacterEncoding("gb2312");%> 【JSTL标签库】新手问题,求帮忙。谢谢。 jquery easy vaildatebox控件怎么屏蔽文本框了?大虾们!帮帮菜鸟吧? 问一个菜鸟问题 .html文件和.JSP文件 .wfm是什么格式,怎样打开 javascript无法运行?是怎么回事?急!! 一些小问题关于jsp的 帮忙:读取DBF数据库时,繁体字读取后出现乱码 各位高手,应用服务器的数据库连接池和自己代码实现的连接池有什么区别?! 怎么连不上呀?在线等? 百度地图开发 TypeError: a.DT is undefined 怎样在web.xml 中配置 *.tld 文件 招聘,招聘,急,急,急
request.setCharacterEncoding(“UTF-8”);
request.getParameter("value").getBytes("8859_1"),"gb2312");
转换输出信息字符集
new String(str.getBytes("GB2312"),"ISO-8859-1");
new String(str.getBytes(" ISO-8859-1 "),“GBK");
request.setCharacterEncoding("UTF-8");
读取数据库数据
str=new String(str.getBytes("GB2312"));
插入数据库数据
str=new String(str.getBytes("ISO-8859-1"));
<%
response.setContentType("text/html;charset=gb2312");
request.setCharacterEncoding("gb2312");
%>