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

Patrick Ulmer ulmer at truckport.de
Fri Aug 24 03:53:11 EDT 2007


>> I have checked it but it is the same problem. Browser is encoding in
>> utf-8 correct, but the result (html sourcecode from zope) is not utf-8
>> anymore after inserting <dtml-var "MessageCatalog('Hallo Welt!')"> and I
>> don't know why it changed. How can a dtml-var-tag changed the encoding
>> for the document?
>>
>
> What about
>
> <dtml-var "_.str(MessageCatalog('Hallo Welt!'))">
>
> Use _.str() solves many potential problems

I think it's the right way for a solution. Now my page is utf-8, but if
the string returned from MessageCatalog have utf-8 chars and not online
chars in ascii range I get this error-message:

*Error Type: UnicodeEncodeError*
*Error Value: 'ascii' codec can't encode character u'\xf4' in position
3: ordinal not in range(128)*

Regards
Patrick


More information about the Zope mailing list