Hello,

i would like to feed a zpt form with data from a python dictionary via a python script


zpt snippet:

<textarea name="title:record:ulines" rows="3"  cols="65">
<tal:span content="python:context.printDict(here.dict)"/>
</textarea>

python script prinDict:

keys_ = dict.keys()
keys_.sort()
lines=[]

for key in keys_:
       lines.append(u"%s:%s\n" %(key ,dict[key]))

uni_str = u"".join(lines)
return uni_str.encode('utf-8')

I'm always getting a  UnicodeDecodeError.

I' using Zope 2.7.5, CMF 1.5.1, Python 2.3.5
HTML meta tag is set to
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
CMF default_charset = utf-8


Regards Joern


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
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 )

Reply via email to