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

Andreas Jung lists at zopyx.com
Fri Aug 24 02:36:50 EDT 2007

--On 24. August 2007 08:32:17 +0200 Patrick Ulmer <ulmer at truckport.de> 

> Hi,
> 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
> zope.
> 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
> <html>
> <head>
>   <meta http-equiv="content-type" content="text/html; charset=utf-8">
> </head>
> <body>
>    ...russian chars...
> </body>
> </html>
> 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?

The http-equiv tag means not much to browser. Try setting the content-type
including the charset within the HTTP response 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20070824/f76d7e9b/attachment.bin

More information about the Zope mailing list