[Zope] UnicodeDecodeError
Joern Wallstabe
joern.wallstabe at igd-r.fraunhofer.de
Mon May 23 04:35:57 EDT 2005
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2092 bytes
Desc: S/MIME Cryptographic Signature
Url : http://mail.zope.org/pipermail/zope/attachments/20050523/4297f70f/smime.bin
More information about the Zope
mailing list