Skip to content

Commit a38d85f

Browse files
committed
bug [ 1007046 ] os.startfile() doesn't accept Unicode filenames
1 parent d82374d commit a38d85f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Modules/posixmodule.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7182,7 +7182,8 @@ win32_startfile(PyObject *self, PyObject *args)
71827182
{
71837183
char *filepath;
71847184
HINSTANCE rc;
7185-
if (!PyArg_ParseTuple(args, "s:startfile", &filepath))
7185+
if (!PyArg_ParseTuple(args, "et:startfile",
7186+
Py_FileSystemDefaultEncoding, &filepath))
71867187
return NULL;
71877188
Py_BEGIN_ALLOW_THREADS
71887189
rc = ShellExecute((HWND)0, NULL, filepath, NULL, NULL, SW_SHOWNORMAL);

0 commit comments

Comments
 (0)