cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Painter-Wakefield <paint...@mc.duke.edu>
Subject Re: [once again] best way to set http header encoding
Date Tue, 17 Feb 2004 16:40:12 GMT




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   |
|         |           <jan.uyttenhove@x|
|         |           ume.com>         |
|         |                            |
|         |           02/17/2004 05:00 |
|         |           AM               |
|         |           Please respond to|
|         |           users            |
|         |                            |
|---------+---------------------------->
  >--------------------------------------------------------------------------------------------------------------|
  |                                                                                      
                       |
  |       To:       users@cocoon.apache.org                                              
                       |
  |       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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message