Message247988
I'm not sure this is the right issue. The support for Unicode filenames is not (at least on Windows) ideal.
Let α.py be a Python script with invalid syntax.
> py α.py
File "<encoding error>", line 2
as as compile error
^
SyntaxError: invalid syntax
On the other hand, if run.py is does something like
path = sys.argv[1]
with tokenize.open(path) as f:
source = f.read()
code = compile(source, path, "exec")
exec(code, __main__.__dict__)
we get
> py run.py α.py
File "Python Unicode\\u03b1.py", line 2
as as compile error
^
SyntaxError: invalid syntax
(or 'File "Python Unicode\α.py", line 2' depending on whether sys.stdout can encode the string).
So the "<encoding error>" in the first example is unfortunate as it is easy to get better result even by a simple pure Python approach. |
|
Date |
User |
Action |
Args |
2015-08-04 12:20:08 | Drekin | set | recipients:
+ Drekin, georg.brandl, ncoghlan, larry, Arfrever, eric.snow, serhiy.storchaka |
2015-08-04 12:20:07 | Drekin | set | messageid: <1438690807.88.0.130669510777.issue19518@psf.upfronthosting.co.za> |
2015-08-04 12:20:07 | Drekin | link | issue19518 messages |
2015-08-04 12:20:07 | Drekin | create | |
|