mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
bpo-20844: open script file with "rb" mode (GH-12616)
This commit is contained in:
parent
62f9588663
commit
10654c19b5
4 changed files with 24 additions and 1 deletions
|
|
@ -283,7 +283,7 @@ static int
|
|||
pymain_run_file(_PyCoreConfig *config, PyCompilerFlags *cf)
|
||||
{
|
||||
const wchar_t *filename = config->run_filename;
|
||||
FILE *fp = _Py_wfopen(filename, L"r");
|
||||
FILE *fp = _Py_wfopen(filename, L"rb");
|
||||
if (fp == NULL) {
|
||||
char *cfilename_buffer;
|
||||
const char *cfilename;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue