[Zope] UTF-8 problem with zope2.10 and postgresql

Claire Boussard claibous2 at free.fr
Fri Nov 6 11:40:06 EST 2009


Hello,

I'm trying to upgrade my applications from debian sarge
to debian lenny, so from zope2.7 to zope2.10.

I've decided to have all in UTF-8 in my new server,
which is the default for lenny, for postgresql also.

The situation now is :
In the database, all is OK
If I create a ZSQL method (say sql_candidat) in the ZMI and test it, all
is OK (example firstname : Andrée)
If I create a dtml method, loop over my ZSQL method, and print
the firstname, it's messed up.

Example dtml:
<dtml-in sql_candidat>
  <dtml-var firstname>
</dtml-in>

The result in the browser is : Andrée

A contrario :
In the page
<input type="text" size="20" name="firstname:utf8:ustring"
In the browser, I type Andrée, I click on submit, the data are saved through
another ZSQL method (UPDATE SQl statement) and all is OK in
the database

In zope.conf:
locale fr_FR.utf8
rest-input-encoding utf-8
rest-output-encoding utf-8
rest-language-code fr
default-zpublisher-encoding utf-8

In the HTML page 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

The HTTP header (with liveHTTPheader in firefox) is correct :
Content-Type: text/html; charset=utf-8


Any idea ?

Claire Boussard.


More information about the Zope mailing list