Nick Coghlan <[email protected]> writes:

> On 9 January 2014 10:07, Ben Finney <[email protected]> wrote:
> > Kristján Valur Jónsson <[email protected]> writes:
> >
> >> Believe it or not, sometimes you really don't care about encodings.
> >> Sometimes you just want to parse text files.
> >
> > Files don't contain text, they contain bytes. Bytes only become text
> > when filtered through the correct encoding.
[…]

> Set the mode to "rb", process it as binary. Done.

Which entails abandoning the stated goal of “just want to parse text
files” :-)

-- 
 \         “All television is educational television. The question is: |
  `\                           what is it teaching?” —Nicholas Johnson |
_o__)                                                                  |
Ben Finney

_______________________________________________
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to