[issue16218] Python launcher does not support non ascii characters

Serhiy Storchaka report at bugs.python.org
Sat Oct 20 09:25:18 CEST 2012


Serhiy Storchaka added the comment:

I can reproduce this on Linux (3.3+ only):

$ name=$(printf "\xff")
$ echo "print('Hello, world')" >$name
$ ./python $name
python: failed to set __main__.__loader__

The issue is in PyRun_SimpleFileExFlags() function, which gets raw char * as the file name (the documentation says about the filesystem encoding (sys.getfilesystemencoding())), but then this name decoded from UTF-8 in set_main_loader().

----------
components: +Interpreter Core -Windows
keywords: +3.3regression
nosy: +serhiy.storchaka
versions: +Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16218>
_______________________________________


More information about the Python-bugs-list mailing list