日期:2014-05-18  浏览次数:20778 次

jsp字符问题,请帮忙看一下
String   s=request.getParameter( "a ");
String   ss=new   String(s.getBytes( "ISO8859-1 "), "GBK ");

我这样处理传过来的中文   为什么还显示的是?号呢



------解决方案--------------------
页面最上面加一行 <%@ page contentType= "text/html; charset=gb2312 " %> 就好了,String ss=new String(s.getBytes( "ISO8859-1 "), "GBK ");就不用要了,这里不需要转
------解决方案--------------------
是ISO-8859-1,不是ISO8859-1吧
------解决方案--------------------
request.setCharacterEncoding( "GBK ")