[Python-checkins] r58478 - sandbox/trunk/import_in_py/Py3K/_importlib.py
brett.cannon
python-checkins at python.org
Mon Oct 15 21:02:27 CEST 2007
Author: brett.cannon
Date: Mon Oct 15 21:02:25 2007
New Revision: 58478
Modified:
sandbox/trunk/import_in_py/Py3K/_importlib.py
Log:
Use UTF-8 as the default encoding. This in no way helps deal with -*- stanzas,
though.
Modified: sandbox/trunk/import_in_py/Py3K/_importlib.py
==============================================================================
--- sandbox/trunk/import_in_py/Py3K/_importlib.py (original)
+++ sandbox/trunk/import_in_py/Py3K/_importlib.py Mon Oct 15 21:02:25 2007
@@ -134,7 +134,9 @@
def open_(path, flags):
"""Stand-in replacement for open() in case it is not available yet."""
try:
- return open(path, flags)
+ # XXX Forcing UTF-8 is fine for a default but there are -*- stanzas to
+ # worry about at some point.
+ return open(path, flags, encoding="utf8")
except NameError:
return DinkyFile(path, flags)
More information about the Python-checkins
mailing list