cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Hoskens ...@schaubroeck.be>
Subject Re: Encoding problems
Date Tue, 03 Aug 2004 06:29:22 GMT
You may want to take a look at the wiki page: 
http://wiki.apache.org/cocoon/RequestParameterEncoding
I had this problem a while ago: 
http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=109100902605917&w=2
I'm wondering what the best solution is and which encoding is preferred 
for handling special characters or when UTF-8 / ISO 8859-1 should/could 
be used.

Kind Regards,
Jan

Volkm@r wrote:

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

>
>
>


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


Mime
View raw message