tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: mojk and utf8 charset problem
Date Mon, 02 May 2011 08:56:10 GMT
Thierry Templier wrote:
> Hi André,
> 
> Thanks very much for your help!
> 
> I checked difference between two access:
> 
> - Using Apache / modjk / Tomcat that can't display correclty non latin1 characters
> - Directly using Tomcat that works fine
> 
> Except characters that don't display correctly content are the same, especially meta
tags at the beginning:
> 
> <meta http-equiv="CONTENT-TYPE" content="text/html; charset=UTF-8"></meta>
> 
> As suggested, I also have a look at request / response content and it seems that there
are some different, as described below.
> 
> - Response headers when using Apache / Modjk / Tomcat:
> 
> Date	Mon, 02 May 2011 08:21:16 GMT
> Server	Apache/2.2.14 (Ubuntu)
> Pragma	no-cache
> Expires	Thu, 01 Jan 1970 00:00:00 GMT
> Cache-Control	no-cache, no-store
> Content-Language	en-UK
> Vary	Accept-Encoding
> Content-Encoding	gzip
> Content-Length	2494
> Keep-Alive	timeout=15, max=93
> Connection	Keep-Alive
> Content-Type	text/html;charset=UTF-8
> 
> - Response headers when directly using Tomcat:
> 
> Server	Apache-Coyote/1.1
> Pragma	no-cache
> Expires	Thu, 01 Jan 1970 00:00:00 GMT
> Cache-Control	no-cache, no-store
> Content-Type	text/html;charset=UTF-8
> Content-Language	en-UK
> Transfer-Encoding	chunked
> Date	Mon, 02 May 2011 08:19:39 GMT
> 
> The content type header is the same and specifies UTF-8 as encoding... However it appears
that when using Apache / modjk / Tomcat, the reponse content is compressed using gzip. It's
not the case when directly accessing Tomcat. I don't know if it could be the reason of the
problem...
> 
It seems unlikely that it would be the compression that causes the problem.
Content encoding is only supposed to be used during the transport from the server to the 
browser.  So it is applied last at the server (Apache) side, and removed first at the 
browser side, before interpreting the content.
But just in case, it should be easy to disable, if even just for a test.

Under Ubuntu, you may try the command "a2dismod deflate" to disable the filter.
Or if that does not work, have a look here to modify your configuration :
http://httpd.apache.org/docs/2.2/mod/mod_deflate.html

I believe Ubuntu is similar to Debian.  If so, then the setup of the mod_deflate filter 
may be in a file like /etc/apache2/mods-available/deflate.conf



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message