The Tomcat changes/fixes related to this problem are released since Tomcat 5.0.15, and also ready for Tomcat 4.1.30 (not released yet, cvs version).
This is however a rather tricky situation, and I think we should at least have the possibility to add the serializer encoding to the http header also, and possibly even make it the default behaviour (via a config option in web.xml?)
Jan
Jan Uyttenhove [EMAIL PROTECTED] Java Software Engineer > Xume < - http://www.xume.com
Christopher Painter-Wakefield wrote:
We also had a problem with Tomcat 4.1.29 and content-type. We backed up to 4.1.27, and are having no problems. Also, we've just started testing with Tomcat 5, and it looks like we don't have the problem with it.
-Christopher
|---------+----------------------------> | | Jan Uyttenhove | | | <[EMAIL PROTECTED]| | | ume.com> | | | | | | 02/17/2004 05:00 | | | AM | | | Please respond to| | | users | | | | |---------+----------------------------> >--------------------------------------------------------------------------------------------------------------| | | | To: [EMAIL PROTECTED] | | cc: | | Subject: Re: [once again] best way to set http header encoding | >--------------------------------------------------------------------------------------------------------------|
allright
If I find the time I'll provide a patch to this, because it is a very serious problem atm. I was investigating problem and solution already myself when you posted it to the maillist, because I can't work with the Apache directive, I will explain why.
The default encoding in the header was added not 'that' long ago[1]. I'm using Tomcat 4.1.29 now, and it *does* set a default encoding to ISO-8859-1. So in a way you're lucky you're still using Tomcat 4.1.12, because with 4.1.29, the apache directive has no effect when connecting to Tomcat :-) This is why I'm looking for a good solution in Cocoon...
We see and will see this issue more and more, as Bruno mentioned, but not only because of the browser implementation. In my opinion this is caused by the changes in this default encoding behaviour when using Tomcat. The very latest changes should change the behaviour again, so the upcoming Tomcat 4.1.30 should behave different again. I don't know what exactly the difference will be, this is wat the changelog for 4.1.30 says: " Restore the ability to explicitly set the charset to iso-latin-1. Now, you won't get the charset unless you ask for it (so no more Content-Type: image/gif; charset=iso-8859-1). However, if you call response.setCharacterEncoding("iso-9959-1"), you now get it in the response."
So conclusion: Somewhere between Tomcat 4.1.12 en 4.1.27 the default encoding behaviour has changed (my guess is 4.1.17), and there's currently no way in Cocoon to set the http header encoding so it matches the encoding of the serializer (and meta tag). Anyone upgrading an old Tomcat will have this problem, unless using ISO-8859-1. The upcoming Tomcat 4.1.30 should change the behaviour again, but I'm not sure in what way.
Jan
[1] http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Response.java
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
smime.p7s
Description: S/MIME Cryptographic Signature