版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/ssxueyi/article/details/88117663
这个乱码问题有很多解决方法, 喜欢用的是以下这2种, 在此记录备用:
String str = new String(request.getParameter("参数").getBytes("iso-8859-1"), "utf-8");
或
request.setCharacterEncoding("UTF-8");
String str =request.getParameter("参数");