后台得到string时
s=new String(s.getBytes("ISO8859-1"),"GBK");
这样即可在后台得到正确的中文
从后台往页面传递内容如果有中文,则只需设置编码
response.setCharacterEncoding("GB2312");
后台得到string时
s=new String(s.getBytes("ISO8859-1"),"GBK");
这样即可在后台得到正确的中文
从后台往页面传递内容如果有中文,则只需设置编码
response.setCharacterEncoding("GB2312");