Message159483
| Author |
serhiy.storchaka |
| Recipients |
W00D00, doerwalter, georg.brandl, r.david.murray, serhiy.storchaka |
| Date |
2012年04月27日.19:00:45 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1335553246.35.0.177836456992.issue7185@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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? |
|