cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Volkm@r" <plsdontre...@arcor.de>
Subject Re: Serialization encoding problem
Date Thu, 22 Jul 2004 07:22:05 GMT
Z.Z. wrote:
> Hi All,
> 
> I use Cocoon 2.1.5.1 in Linux environment. Character set of my xmls is 
> utf-8. All of setting is utf-8 (web.xml, sitemap.xmap, xsls...)
> When I see source of my generated htmls, character set is utf-8. But 
> in body all of accented char is made  by acuted (&aacute; ...). 
> Accented chars In head section is correct, only in body are wrong.
> in head:
> [...]

Any special reason for not using xml serializer for html?

=============================================================
<map:serializers default="xml">
   .....
   <map:serializer name="xhtml" mime-type="application/xhtml+xml"
                   logger="sitemap.serializer.xhtml"
                   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>
     <encoding>UTF-8</encoding>
     <indent>yes</indent>
   </map:serializer>
   <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>
</map:serializers>
=============================================================

The second one is designed to omit XML declaration in order to force 
M$IE into standards compliant mode. And it has *twice* utf-8, one in 
mime-type for the HTTP header and one in <encoding>UTF-8</encoding> for 
serializing the output.

-- 
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