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.

Author vstinner
Recipients Tianjg, eryksun, ezio.melotti, paul.moore, steve.dower, tianjg, tim.golden, vstinner, zach.ware
Date 2017-12-20.22:35:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
run_file() gets a wchar_t* string which comes from wmain() argv.

run_file() encodes the wchar_t* using PyUnicode_EncodeFSDefault().

Later, PyRun_SimpleFileExFlags() calls indirectly fopen() with the encoded filename.

> This could be addressed in _Py_fopen by decoding the path and calling _wfopen instead of fopen. 

I agree that it's the correct fix.

I would make _Py_fopen() more compatible with the PEP 529.
Date User Action Args
2017-12-20 22:35:02vstinnersetrecipients: + vstinner, paul.moore, tim.golden, ezio.melotti, zach.ware, eryksun, steve.dower, Tianjg, tianjg
2017-12-20 22:35:02vstinnersetmessageid: <>
2017-12-20 22:35:02vstinnerlinkissue32381 messages
2017-12-20 22:35:02vstinnercreate