[Zope-dev] bug: fmt=structured-txt and unicode

Andreas Jung Andreas Jung <andreas@andreas-jung.com>
Mon, 28 Apr 2003 19:43:57 +0200


--On Montag, 28. April 2003 19:28 Uhr +0200 Oliver Bleutgen 
<myzope@gmx.net> wrote:

> Hi, when combining localizer and structured text, I found the following
> quirk (Zope 2.6.1):
>
> Rendering an unicode string with
> <dtml-var unicodestring fmt=structured-text>
>
> gives an attribute error with meta_type in Module
> DocumentTemplate.DT_Var, line 407, in structured_text.
>
> A quick glance to the source show the following lines to be the cuplrit:
>
> if isinstance(v,StringType): txt = v
> elif aq_base(v).meta_type in ['DTML Document','DTML Method']:
>     txt = aq_base(v).read_raw()
> else: txt = str(v)
>

What are the experiences with unicode and STX? If it works together well,
I volunteer to fix it in the CVS.

-aj