cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Cocoon Wiki] Updated: RequestParameterEncoding
Date Wed, 04 Aug 2004 11:43:05 GMT
   Date: 2004-08-04T04:43:05
   Editor: ViPi <>
   Wiki: Cocoon Wiki
   Page: RequestParameterEncoding

   no comment

Change Log:

@@ -9,7 +9,7 @@
 After doing some tests with popular browsers, I've noticed that usually browsers will not
let the server know what encoding they used to encode the parameters, so we need to make sure
ourselves that the encoding used when serializing pages corresponds to the encoding used when
decoding request parameters.
 First of all, check in the sitemap what encoding is used when serializing HTML pages:
 <map:serializer logger="sitemap.serializer.html" mime-type="text/html"
        name="html" pool-grow="4" pool-max="32" pool-min="4"
@@ -32,7 +32,17 @@
 the HTMLSerializer and let it add this header in order to get Mozilla and IE working.[[BR]]
 -- ''Someone added this last paragraph here. Good advice (haven't found time to verify it
yet though), but if this is the case we should fix this in Cocoon. Patches welcome in bugzilla.
 -- ''I can confirm it and the effect is obvious when using a recent Tomcat (> 4.1.27):
[ Bug #26997]. But AFAIK the above
must read 'will not respond to the setting of this meta tag '''if''' the encoding/charset
in the "Content-Type" header is set' and Cocoon's problem is, that it does not set the encoding/charset
and the recent Tomcats sets it to default ISO-8859-1. (JoergHeinicke)''[[BR]]
--- ''When HTML serializer is configured {{{<encoding>UTF-8</encoding>}}} to output
UTF-8 then it should also use the appropriate setting for the HTTP header {{{mime-type="text/html;
charset=utf-8"}}} to send the correct information to the browser. (Volkmar W. Pogatzki)''
+-- ''But you can make Cocoon set the header by configuring the serializer with the correct
mime-type information:
+   {{{
+<map:serializer name="html" mime-type="text/html; charset=utf-8"
+       src="org.apache.cocoon.serialization.HTMLSerializer"
+       logger="sitemap.serializer.html" 
+       pool-grow="4" pool-max="32" pool-min="4">
+  <buffer-size>1024</buffer-size>
+  <encoding>UTF-8</encoding>
+The first {{{charset=utf-8}}} is needed for the HTTP header whereas {{{<encoding>UTF-8</encoding>}}}
seems to be responsible for the encoding only of the document's content.
+(Volkmar W. Pogatzki)''
 By default, if the browser doesn't explicitely mention the encoding, a servlet container
will decode request parameters using the ISO-8859-1 encoding (independent of the platform
on which the container is running). So in the above case where UTF-8 was used when serializing,
we would be facing problems.

View raw message