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: [email protected]
Reporter: [email protected]
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: [email protected]
For additional commands, e-mail: [email protected]