Get方式中文乱码问题

来源:互联网 发布:php手册中文版 编辑:程序博客网 时间:2024/05/19 05:30
//解决GET请求时中文乱码问题(首先判断是否为"GET"方式)(这里用的是Struts里的request)if (this.getRequest().getMethod().equals("GET")) {reason = new String(reason.getBytes("iso8859-1"),"utf-8");      }sb.append("&reason=").append(reason);pageMap.put("reason", reason);

0 0