日期:2014-05-16 浏览次数:20307 次
java.net.URLDecoder.decode(s)
request.setCharacterEncoding("utf-8");
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<filter> <filter-name>encodingFilter</filter-name> <filter-class>com.demo.filter.CoreFilter</filter-class> <init-param> <param-name>encoding</param-name> <param-value>utf-8</param-value> </init-param> </filter> <filter-mapping> <filter-name>encodingFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
accept-charset="utf-8" onsubmit="document.charset='utf-8';"
nameCode = new String(request.getParameter("name").getBytes("ISO8859-1"),"UTF-8");
response.setContentType("text/html;charset=utf-8");