Serhiy Storchaka added the comment:
open() uses locale encoding by default. You should specify correct encoding
explicitly for portability and unambiguity.
>>> compile(open("bom3.py", encoding="utf-8-sig").read(), "bom3.py", 'exec')
<code object <module> at 0xb707a7a0, file "bom3.py", line 2>
----------
nosy: +serhiy.storchaka
resolution: -> not a bug
stage: -> resolved
status: open -> closed
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue25051>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com