request获取url的参数编码问题

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/farxix/article/details/81911836

1、设为utf-8编码

request.getParameter("Params")).getBytes("iso-8859-1"), "utf-8" )

2、防止参数为null的情况,

str == null ? "" : str;

3、编解码问题

https://blog.csdn.net/farxix/article/details/78055469

猜你喜欢

转载自blog.csdn.net/farxix/article/details/81911836