Python UTF-8 can't decode byte on 32-bit machine
Posted
by jsh617
on Stack Overflow
See other posts from Stack Overflow
or by jsh617
Published on 2010-04-01T18:28:28Z
Indexed on
2010/04/01
18:33 UTC
Read the original article
Hit count: 227
it works fine on 64 bit machines but for some reason will not work on python 2.4.3 on a 32-bit instance.
i get the error
'utf8' codec can't decode bytes in position 76-79: invalid data
for the code
try:
str(sourceresult.sourcename).encode('utf8','replace')
except:
raise Exception( repr(sourceresult.sourcename ) )
it returns 'kazamidori blog\xf9'
i have modified my site.py file to make UTF8 the default encoding, but still doesnt seem to be working.
© Stack Overflow or respective owner