URIEncoding ='UTF-8'如何工作? [英] How does URIEncoding = 'UTF-8' work?
问题描述
当我查看tomcat源代码 http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tomcat/tomcat- catalina / 7.0.0 / org / apache / catalina / connector / Request.java#Request.parseParameters%28%29
我找不到从get方法获取的queryString的编码位置以及 server.xml
中的配置 URIEncoding =UTF-8
在此方法中的工作方式。 >
When I view the tomcat source code at http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tomcat/tomcat-catalina/7.0.0/org/apache/catalina/connector/Request.java#Request.parseParameters%28%29
I can't find where to set encoding for the queryString which comes from get method and how does the configuration URIEncoding="UTF-8"
in server.xml
work in this method.
推荐答案
URIEncoding
参数是您要查找的内容。它设置在URI解码查询字符串时使用的字符编码。
The URIEncoding
parameter is what you're looking for. It sets the character encoding to be used when URI decoding the query string.
您可以在 server.xml
作为连接器
实体的属性。
You use it in server.xml
as an attribute of the Connector
entity.
如果在过去成功使用它。
If successfully used it in the past.
这篇关于URIEncoding ='UTF-8'如何工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!