# Tomcat i18n 对 URL 进行 UTF-8 解码

**URL:** <https://www.isharkfly.com/t/tomcat-i18n-url-utf-8/9320>\
**Category:** DevOps\
**Created:** [June 17, 2010, 6:03am UTC](https://www.isharkfly.com/t/tomcat-i18n-url-utf-8/9320 "2010-06-17T06:03:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![honeymoose](https://www.isharkfly.com/user_avatar/www.isharkfly.com/honeymoose/32/20796_2.png) [@honeymoose](https://www.isharkfly.com/u/honeymoose)\
**Post date:** [June 17, 2010, 6:03am UTC](https://www.isharkfly.com/t/tomcat-i18n-url-utf-8/9320/1 "2010-06-17T06:03:23Z")

</div>

一些版本的 Tomcat （如 5.0.28） 采用 iso-8859-1 来对 URL 进行解码。

这种方式是不完全符合 RFCs 参考中的标准。

想修复这个问题，可以在 Tomcat 的服务器配置文件中添加 URIEncoding 属性。

这个文件在下面的路径中可以找到。

$TOMCAT\_HOME/conf/server.xml.

修改下面的内容

```auto
<Connector port="8080" URIEncoding="UTF-8"/>

```

 ![image](https://cdn.isharkfly.com/com-isharkfly-www/discourse-uploads/original/3X/8/7/8784e4e75f05544b90761e145192446c2c2ff266.jpeg)

---

<div class="post-metadata">

**Author:** ![honeymoose](https://www.isharkfly.com/user_avatar/www.isharkfly.com/honeymoose/32/20796_2.png) [@honeymoose](https://www.isharkfly.com/u/honeymoose)\
**Post date:** [October 19, 2026, 11:43am UTC](https://www.isharkfly.com/t/tomcat-i18n-url-utf-8/9320/2 "2026-10-19T11:43:14Z")

</div>

2026 年 Tomcat 的版本演进到 9.0.123。

 ![2026-10-19_07-43-01](https://cdn.isharkfly.com/com-isharkfly-www/discourse-uploads/original/3X/f/a/fae190f879224287f94ea873549c1a7d5c843ae2.jpeg)

编码问题好了很多。
