Python 2.6 StreamReader.readline()
cpppwner at gmail.com
cpppwner at gmail.com
Tue Jul 24 11:01:28 EDT 2012
More information about the Python-list mailing list
Tue Jul 24 11:01:28 EDT 2012
- Previous message (by thread): Daemon loses __file__ reference after a while
- Next message (by thread): Python 2.6 StreamReader.readline()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
I have a simple question, I'm using something like the following lines in python 2.6.2
reader = codecs.getreader(encoding)
lines = []
with open(filename, 'rb') as f:
lines = reader(f, 'strict').readlines(keepends=False)
where encoding == 'utf-16-be'
Everything works fine, except that lines[0] is equal to codecs.BOM_UTF16_BE
Is this behaviour correct, that the BOM is still present?
Thanks in advance for your help.
Best,
Stefan
- Previous message (by thread): Daemon loses __file__ reference after a while
- Next message (by thread): Python 2.6 StreamReader.readline()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list