1、客户端的get请求
客户端的get请求是在请求行
String stuname = request.getParameter("stuname");
String str = new String(stuname.getBytes("ISO-8859-1"),"utf-8")
2、客户端的post请求
request. setCharacterEncoding(“UTF-8”);//设置request要查询的码表
3、超链接乱码
与客户端的get请求一样
String stuname = request.getParameter("stuname");
String str = new String(stuname.getBytes("ISO-8859-1"),"utf-8")
4、返回浏览器显示的乱码
response.setContentType(“text/html;charset=utf-8”); //告知客户端使用哪种码表
response. setCharacterEncoding(“UTF-8”);//设置response所使用的码表
目前接触的就这么多