Hi there,
I'm facing character set encoding problems in quite a recent Tomcat 10
setup. I noticed that with the http://localhost:8080/manager/html
application in a browser (my browser) set to German language.
My Tomcat runs from within Eclipse, built with the official build.xml
file. I'm using my forked cklein05/tomcat GitHub repository, which is
nearly up to date with your main branch.
In the Manager application, there are texts which contain German
umlauts, like "Lösche Sitzungen" (Expire sessions, aka
htmlManagerServlet.appsExpire).
These buttons now have captions that look like "Lösche Sitzungen".
Obviously that's an UTF-8 <-> ISO-xxxx-y conversion issue.
I'm pretty sure that my setup is not causing that problems. After
digging into GitHub, I found that recently someone converted many (or
all) messages files to UTF-8:
https://github.com/apache/tomcat/commit/90fe08bdee0494110bb8145d2f067b61f74ae429
However, since these language files are actually java.util.Properties
files, these must be encoded as ISO-8859-1:
https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html#load-java.io.InputStream-
That's also true for more recent versions of Java.
The language files are actually Properties files in a (according do
Javadoc) "simple line-oriented format". These must be loaded with the
Properties.load method(s) and must always be in ISO-8859-1. In contrast,
there are XML-based Properties files, that must be loaded with method(s)
loadFromXML(...). Only these must be encoded in UTF-8.
Although editing international language files in ISO-8859-1 requires
many \uXXXX escapes and is a hassle, for my mind, converting these
plain-text language files to UFT-8 was likely not a good idea.
But why don't others report that problem? Am I overlooking something?
According to my explanation above, that problem is neither limited to
German language nor to the Manager application. It should occur with any
language using non-ascii characters (> 127) and with all localized text
resources Tomcat is using.
Carsten
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org