...
which is the quick & dirty variant, or:
<dtml-var expr="(_['sequence-item'] or
"").decode('iso-8859-7').encode('utf-8')" >
Which uses a "boolean trick".
HTH
Tino
PS: get used to python scripts where this is a lot better
to write
I agree with you and i would write this in python script (if this was
not an emegerncy and i was not a niewbie)
There one more thing to solve. Not all my elements in the list are
strings. If i was writing python i would use
for i,elem in enumerate(data):
for j,ele in enumerate(elem):
if isinstance(ele,(str,unicode)):
print unicode(ele,'iso-8859-7').encode('utf-8')
what is the corresponding dtml-if to check if sequence-item is a
string?
there is same_type to check. But you could just do:
<dtml-var expr="str(_['sequence-item'] or
"").decode('iso-8859-7').encode('utf-8')" >
basically turn everything into a string.
_______________________________________________
Zope maillist - Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )