html设置utf-8,servletrequest设置setCharacterEncoding("utf-8"),乱码
<metaname="content-type"content="text/html;charset=UTF-8">---------------------------...
<meta name="content-type" content="text/html;charset=UTF-8">
---------------------------------------------------------------------------------
request.setCharacterEncoding("utf-8");
System.out.println("Post请求处理中文");
String value = request.getParameter("name");
System.out.println(value);
----------------------------------------------------------------------------------
控制台输出的是乱码,为什么 展开
---------------------------------------------------------------------------------
request.setCharacterEncoding("utf-8");
System.out.println("Post请求处理中文");
String value = request.getParameter("name");
System.out.println(value);
----------------------------------------------------------------------------------
控制台输出的是乱码,为什么 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询