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><span tal:replace="python:request.RESPONSE.setHeader('content-type','text/html;charset=utf-8')" /><br>
<br>and in the HEAD<br><br><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><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"><<a href="mailto:ramosh@gmail.com">ramosh@gmail.com</a>></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 <<a href="mailto:ramosh@gmail.com">ramosh@gmail.com</a>> wrote:<br>
> Yellow,<br>
><br>
> I've noticed charset problems displaying HTML pages.<br>
><br>
> Let's say I want to display a page using a DTML Method like this:<br>
><br>
> <html><br>
> <head><br>
> ...<br>
> </head><br>
><br>
> <body><br>
> á Á à À ç<br>
> </body><br>
> </html><br>
><br>
> This page is ok and I can see the portuguese letters fine.<br>
><br>
> The problem starts when I do this:<br>
><br>
> <html><br>
> <head><br>
> ...<br>
> </head><br>
><br>
> <body><br>
> á Á à À ç <br><br>
> <dtml-var sometextfield><br>
> </body><br>
> </html><br>
><br>
> The first line of characters shows some strange characters and the<br>
> sometextfield shows up fine even if it has the same portuguese<br>
> characters.<br>
><br>
><br>
> sometextfield comes from a mySQL server using utf-8 as charset and collation.<br>
><br>
> zope.conf has the following:<br>
><br>
> rest-input-encoding utf-8<br>
> rest-output-encoding utf-8<br>
><br>
> The browsers also have UTF-8 as the encoding (safari, firefox and<br>
> chrome) all show me the same problem.<br>
><br>
> I also noticed some strange behavior...<br>
> If I create "á Á à À ç" as a property field using ustring and call it<br>
> as <dtml-var someproperty> also gets fine in the browser.<br>
><br>
> Anyone seen this??? Double encoding maybe???<br>
><br>
><br>
> TIA<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>
> "Nobody expects the Spanish Inquisition!" - Monty Python'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>
<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>
"Nobody expects the Spanish Inquisition!" - Monty Python'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>