[size=medium]在异步与后台交互时,经常会出现乱码问题,解决方法:
在controller中return new String(result.toString().getBytes(), "ISO-8859-1");
解决乱码问题[/size]
在controller中return new String(result.toString().getBytes(), "ISO-8859-1");
解决乱码问题[/size]
本文介绍了一种解决异步请求与后台交互时出现乱码的方法。通过在Controller层将返回结果转换为ISO-8859-1编码,可以有效避免乱码现象。
272

被折叠的 条评论
为什么被折叠?