[New-bugs-announce] [issue8168] python3 py_compile does not ignore UTF-8 BOM characters
Ned Deily
report at bugs.python.org
Thu Mar 18 11:43:01 CET 2010
New submission from Ned Deily <nad at 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 <report at bugs.python.org>
<http://bugs.python.org/issue8168>
_______________________________________
More information about the New-bugs-announce
mailing list