2006/8/31, Andreas Jung &lt;<a href="mailto:lists@zopyx.com">lists@zopyx.com</a>&gt;:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><br>--On 31. August 2006 19:28:54 +0200 Dieter Maurer &lt;<a href="mailto:dieter@handshake.de">dieter@handshake.de</a>&gt;<br>wrote:<br><br>&gt; Luiz Fernando Bernardes Ribeiro wrote at 2006-8-30 14:08 -0300:<br>&gt;&gt; 2006/8/29, Andreas Jung &lt;
<a href="mailto:lists@zopyx.com">lists@zopyx.com</a>&gt;:<br>&gt;&gt; ...<br>&gt;&gt; After trying a lot of things, I found the problem is really in the<br>&gt;&gt; zpublisher realm, no matter what kind of encoding trick I use, even with
<br>&gt;&gt; a python script, the output is converted to the default encoding if I<br>&gt;&gt; use any variable or dynamic value from the database.<br>&gt;<br>&gt; If you were right (which I still hope you won't) than someone
<br>&gt; severely misunderstood the meaning of &quot;default&quot;.<br>&gt;<br><br>I think he is not right.<br><br>-aj<br><br></blockquote></div><br>Zope did respect the default setting when I changed the charset header in the file. 
<br>
<br>
The lesson learned is: Working with
two encoding charsets is very trick, and even trickier if you use
the ZMI to edit files. <br><br>I had to create a simple ZPT file with the initial XML block
and &quot;inject&quot; the rest of the xml data, including variables and database, using a tal:content pointing
to a python script encoding everything to utf-8. The ZPT file was
needed as simple way to change the charset header trough the ZMI.<br><br>When you change the charset trough the ZMI Zope trows an exception if it find any non-conforming character, the problem is that since the default charset is set to iso Zope reencodes my file to iso when it generates the editing form field so when I submit it back Zope raises an exception.
<br>
<br>Considering I can't change everything to utf-8 I
will have to live with it and maybe find a simpler pattern to change the charset without raising an exception (maybe the dummy tal:define?).<br><br>I hope it help others.<br>
<br>
Thanks for your help and time,<br>
<br>-- <br>Luiz Fernando B. Ribeiro