On Thu, Jul 26, 2012 at 5:46 PM, Jaroslav Dobrek
<jaroslav.dob...@gmail.com> wrote:
> My problem is solved. What I need to do is explicitly decode text when
> reading it. Then I can catch exceptions. I might do this in future
> programs.

Apologies if it's already been said (I'm only skimming this thread),
but ISTM that you want to open the file in binary mode. You'll then
get back a bytes() instead of a str(), and you can attempt to decode
it separately. You may then need to do your own division into lines
that way, though.

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

Reply via email to