如果你的请求时get的话,用request.setCharacterEncoding("gb2312");是解决不了乱码的, 因为request.setCharacterEncoding("gb2312");只针对post(是post)请求;get请求的话,需要用 String str = new String(变量.getBytes("ISo-8859-1"),"utf-8");
乱码解决方案
最新推荐文章于 2025-04-07 17:34:14 发布