From 402b53d43fe0b711806d3ac55ee7ce22bba900d1 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Wed, 14 Sep 2005 20:51:40 +0000 Subject: [PATCH] bug [ 1007046 ] os.startfile() doesn't accept Unicode filenames --- Modules/posixmodule.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 2f23f822f8..7319568241 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -7248,7 +7248,8 @@ win32_startfile(PyObject *self, PyObject *args) { char *filepath; HINSTANCE rc; - if (!PyArg_ParseTuple(args, "s:startfile", &filepath)) + if (!PyArg_ParseTuple(args, "et:startfile", + Py_FileSystemDefaultEncoding, &filepath)) return NULL; Py_BEGIN_ALLOW_THREADS rc = ShellExecute((HWND)0, NULL, filepath, NULL, NULL, SW_SHOWNORMAL); -- 2.40.0