cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Volkm@r" <plsdontre...@arcor.de>
Subject Re: Encoding problems
Date Mon, 02 Aug 2004 17:10:34 GMT
FREDERIC MOSER wrote:
> Hi,
> 
> I've got some encoding problems using the xhtml serializer, I don't
> really understand .
> (I use Mozilla on Win XP and my editor is set to use UTF-8)
> 
> 
> Part 1:
> -------
> 
> I've got the following stylesheet:
> --------------------------------------------------------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>     <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
>     <xsl:template match="/">
>         <html>
>             <head>
>                 <title>plop</title>
>                 <link rel="stylesheet" type="text/css" href="simple.css"/>
>                 <meta http-equiv="Content-Type" content="text/html;
> charset=UTF-8" />
>             </head>
>             <body>
>             <h1>Monographie ééé</h1>
>                 <div>
>                     <form method="post" action="ModifierMonographie">
>                     ...
> --------------------------------------------------------------------------------------
> 
> If I use : <map:serialize type="html"/>, everything work but the browser
> detect my encoding as IS0-8859-1 (because we can't encode HTML 4.01 as
> UTF-8 I guess??)

Did you check in the components section of your sitemap.xmap how the 
serializers are configured?

To supply HTML using UTF-8 you could use
--------------------------------------------------------------------------------------
<map:serializer name="html" mime-type="text/html; charset=utf-8"
                 logger="sitemap.serializer.html" pool-grow="2"
                 pool-max="64" pool-min="2"
                 src="org.apache.cocoon.serialization.XMLSerializer">
    <doctype-public>-//W3C//DTD XHTML 1.0 Strict//EN</doctype-public>	 
<doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</doctype-system>
    <omit-xml-declaration>yes</omit-xml-declaration>
    <omit-namespaces>yes</omit-namespaces>
    <encoding>UTF-8</encoding>
    <indent>yes</indent>
</map:serializer>
--------------------------------------------------------------------------------------


-- 
Volkmar W. Pogatzki


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


Mime
View raw message