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) Obviously, this fails. Workaround: Use <dtml-var "_.str(unicodestring)" fmt=structured-txt">, works at least for me, though I don't have real exotic unicode strings. Should I stick it in the collector? I didn't find this error there. cheers, oliver
--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
participants (2)
-
Andreas Jung -
Oliver Bleutgen