解决Ajax中文乱码
后台得到string时
s=new String(s.getBytes("ISO8859-1"),"GBK");
这样即可在后台得到正确的中文
从后台往页面传递内容如果有中文,则只需设置编码
response.setCharacterEncoding("GB2312");
后台得到string时
s=new String(s.getBytes("ISO8859-1"),"GBK");
这样即可在后台得到正确的中文
从后台往页面传递内容如果有中文,则只需设置编码
response.setCharacterEncoding("GB2312");
暂无评论。
评论功能维护中,当前仅展示历史评论。