[Zope] *Error Type: UnicodeDecodeError*

jose jo at sferacarta.com
Fri Mar 18 05:44:11 EST 2005


Hi all,

I have a PythonScript like this, to list the village names in serbian 
language, and it works....

data=request.SESSION.get('data')
items=len(data[0]['head'])
for j in range(items):
# print container.mescat('city: ') + data[0]['head'][j][5]
print data[0]['head'][j][5]
return printed

result:

Priština
Beleg

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If I change the script like this one, it doesn't work anymore:

data=request.SESSION.get('data')
items=len(data[0]['head'])
for j in range(items):
print container.mescat('city: ') + data[0]['head'][j][5]
# print data[0]['head'][j][5]
return printed


It should print this result:

sela: Priština
sela: Beleg

but I have instead the following error:

*Error Type: UnicodeDecodeError*
*Error Value: 'ascii' codec can't decode byte 0xc5 in position 5: 
ordinal not in range(128)

*
Any help would be appreciated.

Jo


More information about the Zope mailing list