You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@cocoon.apache.org by do...@cocoon.apache.org on 2004/07/08 16:44:17 UTC
[Cocoon Wiki] Updated: OutputEncoding
Date: 2004-07-08T07:44:17
Editor: TimGoodwin <tj...@ast.cam.ac.uk>
Wiki: Cocoon Wiki
Page: OutputEncoding
URL: http://wiki.apache.org/cocoon/OutputEncoding
no comment
Change Log:
------------------------------------------------------------------------------
@@ -1,26 +1,30 @@
This [:sitemap] excerpt shows how to configure the encoding on documents generated by the HTML and XML [:Serializer]s:
-{{{
- <!-- these definitions go into the map:serializers element -->
-
- <!-- configure the XML serializer to use iso-8859-1 encoding -->
- <map:serializer
- name="xml"
- mime-type="text/xml"
- src="org.apache.cocoon.serialization.XMLSerializer"
- pool-max="32"
- pool-min="16"
- pool-grow="4"
- >
- <encoding>iso-8859-1</encoding>
- </map:serializer>
-
- <!-- configure the HTML serializer to use iso-8859-1 encoding -->
- <map:serializer
- name="html"
- mime-type="text/html"
- src="org.apache.cocoon.serialization.HTMLSerializer"
- >
- <encoding>iso-8859-1</encoding>
- </map:serializer>
+{{{
+ <!-- these definitions go into the map:serializers element -->
+
+ <!-- configure the XML serializer to use iso-8859-1 encoding -->
+ <map:serializer
+ name="xml"
+ mime-type="text/xml"
+ src="org.apache.cocoon.serialization.XMLSerializer"
+ pool-max="32"
+ pool-min="16"
+ pool-grow="4"
+ >
+ <encoding>iso-8859-1</encoding>
+ </map:serializer>
+
+ <!-- configure the HTML serializer to use iso-8859-1 encoding -->
+ <map:serializer
+ name="html"
+ mime-type="text/html"
+ src="org.apache.cocoon.serialization.HTMLSerializer"
+ >
+ <encoding>iso-8859-1</encoding>
+ </map:serializer>
}}}
+
+Well, I'm sure ''that'' example works just fine, since ISO-88859-1 seems to be the default anyway!
+But my attempts to persuade Cocoon (via jetty) to label its output as UTF-8 hakve all been in vain. Just to clarify, Cocoon is correctly generating UTF-8 encoded characters, but something is slapping
+{{{ Content-Type: text/html; charset=ISO-8859-1 }}} in the HTTP headers. Needless to say, this combination induces browser indigestion. Any clues? -- TimGoodwin