How do I encode and decode this data to write to a file?

Andrew Berg bahamutzero8825 at gmail.com
Mon Apr 29 06:11:11 EDT 2013


On 2013.04.29 04:47, cl at isbd.net wrote:
> If I understand correctly the encode() is saying that it can't
> understand the data in the html because there's a character 0xc3 in it.
> I *think* this means that the é is encoded in UTF-8 already in the
> incoming data stream (should be as my system is wholly UTF-8 as far as I
> know and I created the directory name).
You can verify that your filesystem is set to use UTF-8 with sys.getfilesystemencoding(). If it returns 'ascii', then your locale settings
are incorrect.

-- 
CPython 3.3.1 | Windows NT 6.2.9200 / FreeBSD 9.1



More information about the Python-list mailing list