Web开发中的中文乱码
1、在服务端将请求和响应设置成相同的UTF-8字符编码; 如: request.setCharacterEncoding("UTF-8"); response.setCharacterEncoding("UTF-8"); 2、将发送过来的数据用String类型重构 如: String str = request.getAttribute("test"); String newString = new String(str.getBytes("iso-8859-1"),"UTF-8");