这是抓包后的:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/html charset=utf-8;charset=ISO-8859-1
Content-Length: 63
Date: Wed, 07 Jan 2015 18:24:59 GMT
代码中 登录页面、验证页面、主页面 的设置:
response.setContentType("text/html;charset=utf-8");
response.setCharacterEncoding("utf-8");
PrintWriter out = response.getWriter();
已经设置过了,为什么还会有_**_charset=ISO-8859-1_**_
单独访问页面都没有乱码,只要是从mysql发出的中文全是用???代替
在此先谢谢各位。。
对中文内容做一个htmlencode再输出看看
问题是出在charset=ISO-8859-1这里了,应该用charset=utf-8,是不是你浏览器里有什么设置,换到IE或者其它浏览器里再看看
是不是你服务器附加的响应头,自己查下web服务器配置
utf-8 编码格式
Content-Type: text/html charset=utf-8;charset=ISO-8859-1
这怎么有两个charset