Serhiy Storchaka added the comment: Use the utf-8-sig encoding. See also issue17909. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue18958> _______________________________________