中文乱码问题

window.location.href url含中文服务器收到乱码问题解决

(1).页面中先对中文进行编码。

如:window.location.href = url+"&groupName=" + encodeURI(encodeURI(groupName)) ;

注意,页面部分需要编码两次。

(2).在服务端进行解码。
  groupName= java.net.URLDecoder.decode(groupName, "UTF-8");

相关文章:

  • 2021-12-15
  • 2021-12-13
  • 2021-09-29
  • 2022-12-23
  • 2021-11-11
  • 2021-05-21
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-06-11
  • 2022-12-23
  • 2021-06-20
  • 2022-12-23
  • 2021-11-19
  • 2022-12-23
相关资源
相似解决方案