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

Dieter Maurer dieter at handshake.de
Fri Aug 24 13:38:04 EDT 2007


Patrick Ulmer wrote at 2007-8-24 10:26 +0200:
>I think I solved the problem.
>
><dtml-var "MessageCatalog('Hallo Welt!').encode('utf-8')">
>
>works. I read some further and found out that I should use something like
>
>import sys
>sys.setdefaultencoding('utf-8')
>
>I set it global in sitecustomize.py under /usr/lib/python2.4/site-packages and then 
>
>
><dtml-var "MessageCatalog('Hallo Welt!')">
>
>works. Now I only must find the right place for setdefaultencoding() so
>it only affect my zope-instance.

"$INSTANCE_HOME/lib/python" would be a good place for the
"site-customize.py".



-- 
Dieter


More information about the Zope mailing list