You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2019/10/01 07:12:48 UTC
[Bug 63792] New: The tomcat log contains garbled code because of
i18n
https://bz.apache.org/bugzilla/show_bug.cgi?id=63792
Bug ID: 63792
Summary: The tomcat log contains garbled code because of i18n
Product: Tomcat 9
Version: 9.0.x
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P2
Component: Util
Assignee: dev@tomcat.apache.org
Reporter: lgxbslgx@gmail.com
Target Milestone: -----
The tomcat log contains garbled code which is hard to read because of i18n. If
tomcat is running in China, an example log(tomcat start log) is shown below.
Actual log:
01-Oct-2019 13:54:06.909 信息 [main] org.apache.coyote.AbstractProtocol.start
å¼å§åè®®å¤çå¥æ["http-nio-8080"]
01-Oct-2019 13:54:06.925 信息 [main] org.apache.coyote.AbstractProtocol.start
å¼å§åè®®å¤çå¥æ["ajp-nio-8009"]
Expected log:
01-Oct-2019 14:15:21.385 信息 [main] org.apache.coyote.AbstractProtocol.start
开始协议处理句柄["http-nio-8080"]
01-Oct-2019 14:15:21.397 信息 [main] org.apache.coyote.AbstractProtocol.start
开始协议处理句柄["ajp-nio-8009"]
It is caused by org.apache.tomcat.util.res.StringManager#getString and
java.util.PropertyResourceBundle. Prior to java 9, the PropertyResourceBundle
loads properties using encoding ISO-8859-1. The encoding ISO-8859-1 can only
represent the Latin letters, not all characters. When we use languages which
are not based on Latin letters, such as Chinese, the garbled codes appear.
Fortunately, Java 9 and later version fix this issue by using UTF-8 instead of
ISO-8859-1 by default. Tomcat should address this issue when users use previous
version of Java 9. This issue affects branch 7.0.x, 8.5.x, 9.0.x and all the
tomcat releases after i18n. I will submit a pull request later to fix it.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 63792] The tomcat log contains garbled code because of i18n
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63792
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|NEW |RESOLVED
--- Comment #1 from Mark Thomas <ma...@apache.org> ---
During the build process, the UTF-8 property files are converted to correctly
escaped ISO-8859-1 via the native2ascii Ant task.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org