UTF-8 problem encoding and decoding in Python3

hidura at gmail.com hidura at gmail.com
Sun Oct 10 19:25:39 CEST 2010

Hello everybody i am trying to encode a file string of an upload file and i  
am facing some problems with the first part of the file. When i open  
directly and try to decode the file the error is this:  
`UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 0:  
unexpected code byte` here is the first part of the file:
but when i try to encode the file in the server the encode change the parts  
of the file and the result is  
this:`\xc3\xbf\xc3\x98\xc3\xbf\xc3\xa0\x00\x10JFIF` without say that the  
file doesn 't save correctly.

Any ideas?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20101010/96be66e3/attachment.html>

More information about the Python-list mailing list