https://bz.apache.org/bugzilla/show_bug.cgi?id=63985

--- Comment #2 from Hubert Gailly <h...@dagas.fr> ---
Thanks for the answer, I knew all this, but to my opinion there is a consequent
bug in Tomcat 9.

Same text is saved in UTF8 in 2 separate files one with BOM, one without BOM.
All the declared as UTF-8.
In Apache 'httpd.conf' : AddDefaultCharset UTF-8 In tomcat 'server.xml' :
<Connector port="8009" enableLookups="false" redirectPort="8443"
protocol="AJP/1.3" URIEncoding="UTF-8"/> In the file itself : <META
content="text/html; charset=utf-8" http-equiv=Content-Type>

I tried all different configurations :
In both application and tomcat 'web.xml'
<init-param>
            <param-name>fileEcoding</param-name>
            <param-value>UTF8</param-value> 
</init-param> 
Or 
<init-param>
            <param-name>fileEcoding</param-name>
            <param-value>UTF-8</param-value> 
</init-param> 
And/Or 
Starting Tomcat 9 with
-Dfile.encoding=UT8
Or
-Dfile.encoding=UTF-8

Now, the response is correctly received as UTF-8 in both cases by the browser.

If served by Tomcatthe file with no BOM is corrupted. Accents are rubbish
characters.
I save the file as ISO-8859-1, it is correct.

That means that whatever I say to Tomcat9, if there is a UTF8 static file,
Tomcat9 always reads it as a ISO-8859-1, thus breaking the characters.
There is no problem with the file with BOM.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to