On 4/29/2013 5:47 AM, c...@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).

So how do I change the code so I don't get the error?  Do I just
decode() the data first and then encode() it?


BTW, I did a presentation at PyCon 2012 that many people have found helpful: Pragmatic Unicode, or, How Do I Stop the Pain: http://nedbatchelder.com/text/unipain.html . It explains the principles at work here.

--Ned.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to