[Zope] Zope newbie.... unicode problem

Dieter Maurer dieter at handshake.de
Fri Dec 1 12:55:56 EST 2006


Please stay on the mailing list!

Readded....

Tyler Nally wrote at 2006-11-30 17:17 -0500:
>> From: Dieter Maurer [mailto:dieter at handshake.de]
>>
>> It occurs when a template mixes unicode and some non unicode string
>> containing non ASCII characters.
>
>OK... very good.  How do I get my hands on the template that has the
>embedded Unicode characters?

Usually, it is not the template itself.

As the template contains text, it should (in principle) be unicode --
but Zope is still not that far. There are patches around to change
this state and Zope 2.10 might support unicode templates (but I am unsure).

Thus, usually, the template is not unicode and some dynamic parts
(included via "tal:content|replace|attributes") are unicode.


To analyse those problems (I have set Python's default encoding
to my site encoding such that I do no longer see such problems)
I would reproduce the problem in an interactive Python interpreter
("bin/zopectl debug" under *nix -- there are also solution for
Windows, but you need to search for them yourself) and use
"pdb.pm()" to find out all relevant details.



-- 
Dieter


More information about the Zope mailing list