标签:字符集 pos coding 解决方案 默认 需要 bsp ring 方案
tomcat8之前默认是ISO8859-1,tomcat8及其以后,是UTF-8,这时get请求中的中文参数不需要再另行处理乱码问题了
tomcat8之前乱码的解决方案:post:request.setCharacterEncoding("UTF-8");
get:new String(username.getBytes("ISO-8859-1"),"UTF-8");先反向解码,然后再用UTF-8编码
标签:字符集 pos coding 解决方案 默认 需要 bsp ring 方案
原文地址:http://www.cnblogs.com/zhengzhen0512/p/7683822.html