[Zope] utf-8 problem in Zope when using Localizer

Patrick Ulmer ulmer at truckport.de
Fri Aug 24 02:32:17 EDT 2007


because nobody in der Localizer-Mailings list react and I thinks it could
be a common problem with utf-8 in zope, I ask my question here also.
I use Localizer 1.2.1 and I try out some things and all looks
great. After testing Localizer my next plan was to switch from encoding
ISO-8859-15 to utf-8 in Zope 2.10.3 but run into Problems when
inserting text through a MessageCatalog (object of Localizer).

Here is what I do in Zope:

1. I add "default-zpublisher-encoding utf-8" to my zope.conf and restart
2. In ZMI I add the property "management_page_charset" and set it to "utf-8"
3. I add a new "DTML Document" and start editing. I check the encoding
in my Browser and it switched to "unicode (utf-8)". Looks good.
4. I insert html-code and some russian chars for testing

  <meta http-equiv="content-type" content="text/html; charset=utf-8">
   ...russian chars...

After Saving all looks great in ZMI and also in my webbrowser.

5. Now I add one line to use a MessageCatalog:

<dtml-var "MessageCatalog('Hallo Welt!')">

After that, all of my utf-8-chars are broken in my webbrowser. I check
browser-encoding and it is still utf-8. In ZMI my "DTML Document" looks
good. This line must switch something in the output-encoding in the
internal page-render (I don't know, how to better explain it). Is this
an error in Localizer or in Zope or have I overlook a fault?


More information about the Zope mailing list