request中文乱码

来源:互联网 发布:随机森林分类算法 编辑:程序博客网 时间:2024/06/05 10:10
 * request获取中文乱码
* post请求:
* //设置request缓冲区编码
request.setCharacterEncoding("UTF-8");
* get请求:
* username = new String(username.getBytes("ISO8859-1"),"UTF-8");
*/
0 0
原创粉丝点击