URIEncoding ='UTF-8'如何工作? [英] How does URIEncoding = 'UTF-8' work?

查看:246
本文介绍了URIEncoding ='UTF-8'如何工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我查看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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆