中文乱码问题
window.location.href url含中文服务器收到乱码问题解决
(1).页面中先对中文进行编码。
如:window.location.href = url+"&groupName=" + encodeURI(encodeURI(groupName)) ;
注意,页面部分需要编码两次。
(2).在服务端进行解码。
groupName=
java.net.URLDecoder.decode(groupName, "UTF-8");
(1).页面中先对中文进行编码。
如:window.location.href = url+"&groupName=" + encodeURI(encodeURI(groupName)) ;
注意,页面部分需要编码两次。
(2).在服务端进行解码。
groupName=
java.net.URLDecoder.decode(groupName, "UTF-8");