Re: read from file with mixed encodings in Python3

2011-11-07 Thread Peter Otten
Jaroslav Dobrek wrote: > Hello, > > in Python3, I often have this problem: I want to do something with > every line of a file. Like Python3, I presuppose that every line is > encoded in utf-8. If this isn't the case, I would like Python3 to do > something specific (like skipping the line, writing

Re: read from file with mixed encodings in Python3

2011-11-07 Thread Dave Angel
On 11/07/2011 09:23 AM, Jaroslav Dobrek wrote: Hello, in Python3, I often have this problem: I want to do something with every line of a file. Like Python3, I presuppose that every line is encoded in utf-8. If this isn't the case, I would like Python3 to do something specific (like skipping the

read from file with mixed encodings in Python3

2011-11-07 Thread Jaroslav Dobrek
Hello, in Python3, I often have this problem: I want to do something with every line of a file. Like Python3, I presuppose that every line is encoded in utf-8. If this isn't the case, I would like Python3 to do something specific (like skipping the line, writing the line to standard error, ...) L