Message159483
I checked out. Files opened in "utf-8-sig" are seekable.
>>> open('test', 'w', encoding='utf-8-sig').write('qwerty\nйцукен\n')
>>> open('test', 'r', encoding="utf-8").read()
'\ufeffqwerty\nйцукен\n'
>>> open('test', 'r', encoding="utf-8-sig").read()
'qwerty\nйцукен\n'
>>> with open('test', 'r', encoding="utf-8-sig") as f:
... print(ascii(f.readline()))
... f.seek(0)
... print(ascii(f.readline()))
...
'qwerty\n'
0
'qwerty\n'
Should this issue be closed? |
|
Date |
User |
Action |
Args |
2012-04-27 19:00:46 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, doerwalter, georg.brandl, r.david.murray, W00D00 |
2012-04-27 19:00:46 | serhiy.storchaka | set | messageid: <1335553246.35.0.177836456992.issue7185@psf.upfronthosting.co.za> |
2012-04-27 19:00:45 | serhiy.storchaka | link | issue7185 messages |
2012-04-27 19:00:45 | serhiy.storchaka | create | |
|