cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Colin Paul Adams <co...@colina.demon.co.uk>
Subject Re: How can I set the charset/encoding in coocon2
Date Mon, 16 Jul 2001 18:27:32 GMT
>>>>> "Christoph" == C Gaffga <cgaffga@triplemind.com> writes:

    Christoph> How can I set the output encoding/charset for coocon2?
    Christoph> My xml-file, and my xsl-file as well, use ISO-8859-1
    Christoph> (Latin-1), but my output is UTF-8! Why?

it appears to be the default encoding for the serialiser. Add an
<encoding> tag to your serialiser in the sitemap, or add a <meta> tag
such as the following to the <head> section in your xsl file:

<meta http-equiv="Content-Type" content="text/html;
charset="ISO-8859-1" />,

or both.

I am using the following:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

as I want UTF-8 output, and I need to tell the browser.

I'm using the following serialser:

      <map:serializer name="xhtml" mime-type="text/html" 
        src="org.apache.cocoon.serialization.XMLSerializer">
        <doctype-public>-//W3C//DTD XHTML 1.1//EN</doctype-public>
        <doctype-system>http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd</doctype-system>
        <encoding>UTF-8</encoding>
        <omit-xml-declaration>no</omit-xml-declaration>
      </map:serializer>

Note the name - that's not the default, so if you want to use this,
you have to use the following line in your pipeline:

 <map:serialize type="xhtml" />
-- 
Colin Paul Adams
Preston Lancashire

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message