标签:os ar new on har sp user server
Post方式乱码:request.setCharacterEncoding(“utf-8”);
GET方式:
1.修改tomcat解码字符集 conf/server.xml URIEndoing=”utf-8”
2.手动重新编码
username = URLEncoder.encode(username, “ISO-8859-1”);
username = URLDecoder.decode(username,”utf-8”);
简化:
username = new String(username.getBytes(“ISO-8859-1”), “utf-8”);
标签:os ar new on har sp user server
原文地址:http://www.cnblogs.com/nophy/p/3911391.html