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/12/12 09:33:21 UTC
[Bug 64000] New: Localization of examples web application is broken
because of ISO-8859-1
https://bz.apache.org/bugzilla/show_bug.cgi?id=64000
Bug ID: 64000
Summary: Localization of examples web application is broken
because of ISO-8859-1
Product: Tomcat 7
Version: trunk
Hardware: PC
Status: NEW
Severity: minor
Priority: P2
Component: Examples
Assignee: dev@tomcat.apache.org
Reporter: knst.kolinko@gmail.com
Target Milestone: ---
The following issue was noted when testing Tomcat 7.0.99 (release candidate)
running on a Russian version of Windows:
The title of RequestParamExample page displays "?????..." instead of readable
text.
Affected page:
http://localhost:8080/examples/servlets/servlet/RequestParamExample
Quick notes:
------------
1. As displayed by "Network" tab in Developer tools in Firefox, the server
sends the following Content-Type header for this page:
Content-Type: text/html;charset=ISO-8859-1
Apparently the examples web application in Tomcat 7 has not been converted to
use UTF-8 yet, unlike the one in Tomcat 8.5+.
2. I cannot test the issue via configuration of language preferences in my
browser. Apparently the localization relies on the system locale.
It would be better to respect the client's language preferences.
Steps to reproduce:
------------
1. Use an OS that uses Russian or Japanese locale, if possible. Otherwise add
the following line to bin/setenv.bat file in Tomcat.
set "JAVA_OPTS=-Duser.language=ru"
or with Japanese language (ja).
2. Start Tomcat with bin/startup.bat.
3. Open the following page in a browser:
Examples > Servlets examples > Request Parameters
http://localhost:8080/examples/servlets/servlet/RequestParamExample
4. Actual behavior:
The title of the page displays the following string of question marks instead
of a readable text:
"?????? ?????????? ???????"
The source code of "webapps\examples\WEB-INF\classes\RequestParamExample.java"
shows that the page title is localized:
> String title = RB.getString("requestparams.title");
Looking into localization files (LocalStrings_ru.properties in the same
directory as the java file) the "requestparams.title" message is the only one
localized here. For Japanese language there are a lot of other localized
messages and it is more easy to notice the issue.
--
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 64000] Localization of examples web application is broken
because of ISO-8859-1
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64000
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
OS| |All
--- Comment #1 from Mark Thomas <ma...@apache.org> ---
Fixed in:
- master for 10.0.0.0-M1 onwards
- 9.0.x for 9.0.31 onwards
- 8.5.x for 8.5.51 onwards
- 7.0.x for 7.0.100 onwards
--
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