Hi,<br><br>You have to make sure that everything has the same encoding (strings, text values). I recomend you to convert everything to unicode and then put something like below as a first line in your page:<br><br>&lt;span tal:replace=&quot;python:request.RESPONSE.setHeader(&#39;content-type&#39;,&#39;text/html;charset=utf-8&#39;)&quot; /&gt;<br>
<br>and in the HEAD<br><br>&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;<br><br>HTH,<br>Dragos<br><br><br><div class="gmail_quote">On Mon, Feb 6, 2012 at 2:38 PM, Hugo Ramos <span dir="ltr">&lt;<a href="mailto:ramosh@gmail.com">ramosh@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I guess no one has charset problems...<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
On Thu, Feb 2, 2012 at 6:06 PM, Hugo Ramos &lt;<a href="mailto:ramosh@gmail.com">ramosh@gmail.com</a>&gt; wrote:<br>
&gt; Yellow,<br>
&gt;<br>
&gt; I&#39;ve noticed charset problems displaying HTML pages.<br>
&gt;<br>
&gt; Let&#39;s say I want to display a page using a DTML Method like this:<br>
&gt;<br>
&gt; &lt;html&gt;<br>
&gt; &lt;head&gt;<br>
&gt; ...<br>
&gt; &lt;/head&gt;<br>
&gt;<br>
&gt; &lt;body&gt;<br>
&gt; á Á à À ç<br>
&gt; &lt;/body&gt;<br>
&gt; &lt;/html&gt;<br>
&gt;<br>
&gt; This page is ok and I can see the portuguese letters fine.<br>
&gt;<br>
&gt; The problem starts when I do this:<br>
&gt;<br>
&gt; &lt;html&gt;<br>
&gt; &lt;head&gt;<br>
&gt; ...<br>
&gt; &lt;/head&gt;<br>
&gt;<br>
&gt; &lt;body&gt;<br>
&gt; á Á à À ç &lt;br&gt;<br>
&gt; &lt;dtml-var sometextfield&gt;<br>
&gt; &lt;/body&gt;<br>
&gt; &lt;/html&gt;<br>
&gt;<br>
&gt; The first line of characters shows some strange characters and the<br>
&gt; sometextfield shows up fine even if it has the same portuguese<br>
&gt; characters.<br>
&gt;<br>
&gt;<br>
&gt; sometextfield comes from a mySQL server using utf-8 as charset and collation.<br>
&gt;<br>
&gt; zope.conf has the following:<br>
&gt;<br>
&gt; rest-input-encoding utf-8<br>
&gt; rest-output-encoding utf-8<br>
&gt;<br>
&gt; The browsers also have UTF-8 as the encoding (safari, firefox and<br>
&gt; chrome) all show me the same problem.<br>
&gt;<br>
&gt; I also noticed some strange behavior...<br>
&gt; If I create &quot;á Á à À ç&quot; as a property field using ustring and call it<br>
&gt; as &lt;dtml-var someproperty&gt; also gets fine in the browser.<br>
&gt;<br>
&gt; Anyone seen this??? Double encoding maybe???<br>
&gt;<br>
&gt;<br>
&gt; TIA<br>
&gt;<br>
&gt; --<br>
&gt; Hugo Ramos - IT Project Manager<br>
&gt; E: <a href="mailto:ramosh@gmail.com">ramosh@gmail.com</a><br>
&gt; W: <a href="http://www.hugoramos.eu" target="_blank">www.hugoramos.eu</a><br>
&gt;<br>
&gt; &quot;Nobody expects the Spanish Inquisition!&quot; - Monty Python&#39;s<br>
&gt;<br>
&gt; Para visualizar este email em 3D, bata com uma bola de snooker na<br>
&gt; testa e fixe o ecrã durante 5 minutos a uma distância de 20cm.<br>
<br>
<br>
<br>
--<br>
Hugo Ramos - IT Project Manager<br>
E: <a href="mailto:ramosh@gmail.com">ramosh@gmail.com</a><br>
W: <a href="http://www.hugoramos.eu" target="_blank">www.hugoramos.eu</a><br>
<br>
&quot;Nobody expects the Spanish Inquisition!&quot; - Monty Python&#39;s<br>
<br>
Para visualizar este email em 3D, bata com uma bola de snooker na<br>
testa e fixe o ecrã durante 5 minutos a uma distância de 20cm.<br>
_______________________________________________<br>
Zope maillist  -  <a href="mailto:Zope@zope.org">Zope@zope.org</a><br>
<a href="https://mail.zope.org/mailman/listinfo/zope" target="_blank">https://mail.zope.org/mailman/listinfo/zope</a><br>
**   No cross posts or HTML encoding!  **<br>
(Related lists -<br>
 <a href="https://mail.zope.org/mailman/listinfo/zope-announce" target="_blank">https://mail.zope.org/mailman/listinfo/zope-announce</a><br>
 <a href="https://mail.zope.org/mailman/listinfo/zope-dev" target="_blank">https://mail.zope.org/mailman/listinfo/zope-dev</a> )<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Dragos Chirila<br><a href="mailto:objectValues@gmail.com">objectValues@gmail.com</a><br>(+4) 0722 395375<br><br>