Hi,

I've noticed in Zope 2.10 that the behaviour of ZPT with regard to encoded values returned by a database has changed which leads to errors when using string: and non-ascii characters.


ie.

<tal:content tal:content="string: ${result/firstname} ${result/surname}" /> will raise UnicodeDecodeError
for result = {'firstname':'charlie', 'surname':'Düsseldorf'}
but not if Python string formatting is used
<tal:content tal:content="python: '%s %s' % (result['firstname'], result['surname'])" />

Is this the only workaround apart from decoding all return values?

Charlie
--
Charlie Clark
eGenix.com

Professional Python Services directly from the Source
Python/Zope Consulting and Support ...        http://www.egenix.com/
mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

:::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! ::::

    eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
_______________________________________________
ZPT mailing list
ZPT@zope.org
http://mail.zope.org/mailman/listinfo/zpt

Reply via email to