New submission from Ned Deily <n...@acm.org>: $ cat bom3.py # coding: utf-8 print("BOM BOOM!") $ file bom3.py bom3.py: UTF-8 Unicode (with BOM) text $ python3.1 Python 3.1.1+ (r311:74480, Jan 20 2010, 00:37:31) [GCC 4.4.3 20100108 (prerelease)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import bom3 BOM BOOM! >>> import py_compile >>> py_compile.compile("bom3.py") File "bom3.py", line 1 # coding: utf-8 ^ SyntaxError: invalid character in identifier
The same test does not fail with python2.6.4. (Same results on OS X.) ---------- components: Library (Lib) messages: 101257 nosy: ned.deily severity: normal status: open title: python3 py_compile does not ignore UTF-8 BOM characters versions: Python 3.1, Python 3.2 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8168> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com