cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Portier <>
Subject Re: [heads up] cocoon's defaults form-encoding and seerialize-encoding are inconsistent.
Date Fri, 31 Oct 2003 17:06:11 GMT

Thx to Carsten's suggestions I have a patch for this that rougly looks like

1/ in src/java/org/apache/cocoon/

2/ in  src/java/org/apache/cocoon/serialization/

   . add imports for Contextualizable
   . add interface to class declaration
   . use contextualize method to set default encoding to what is set in 
the context
   . note that the configure can still change it depending on the 
sitemap conf

3/ in src/java/org/apache/cocoon/servlet/

   . in the init() we add the default encoding to the context as read 
from the servlet-initParameter "form-encoding"

now, since the last defaults to iso-8859-1 there is a bit of a 
side-effect to this patch which I introduced in my original posting

>>> * While at it, shouldn't we kinda default to UTF-8 anyway? even if 
>>> that is not the default encoding of the servlet-container? (some 
>>> gutfeeling argument: I think cocoon is closer to XML then to 
>>> servlet-containers?)

if I just apply the patch as described above the side-effect will be 
that the default-serialization for all our text-serializers (unless 
overriden by the config in the sitemap.xmap) will change from utf-8 
(more precisely: whatever xalan defaults to) to iso-8859-1

maybe that isn't that bad, but just wanted to make you all aware.
do we need a vote on this, or do I just as I redeem best?

personally I think this patch should come together with a change to our 
web.xml so we rather change the default form-encoding to be also "utf-8"

other opinions?

thx for any feedback
Marc Portier                  
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at                        

View raw message