This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: 'compile' refuses BOM.
Type: Stage:
Components: Unicode Versions: Python 2.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: loewis Nosy List: jvr, kirill_simonov, lemburg, loewis
Priority: normal Keywords:

Created on 2003-02-03 23:05 by kirill_simonov, last changed 2022-04-10 16:06 by admin. This issue is now closed.

Messages (4)
msg14413 - (view) Author: Kirill Simonov (kirill_simonov) Date: 2003-02-03 23:05
The builtin 'compile' function refuses source files
with UTF-8 BOM marks.

For example,

$ python2.3 testutf8.py

works correctly, but

$ python2.3
>>> compile(open('testutf8.py').read(), 'testutf8.py',
'exec')

fails.

msg14414 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2003-02-04 09:18
Logged In: YES 
user_id=38388

No time for this. Assigning to Martin. Feel free to pass it on.
msg14415 - (view) Author: Kirill Simonov (kirill_simonov) Date: 2003-02-04 21:24
Logged In: YES 
user_id=36553

I have uploaded a patch to fix this bug: #680474.
Hope somebody find time to apply it.
msg14416 - (view) Author: Just van Rossum (jvr) * (Python triager) Date: 2003-02-09 20:46
Logged In: YES 
user_id=92689

Fixed in rev. 2.72 of tokenize.c. Patch #680474 has been applied.
History
Date User Action Args
2022-04-10 16:06:29adminsetgithub: 37902
2003-02-03 23:05:37kirill_simonovcreate