From: Georg Brandl Date: Wed, 14 Sep 2005 20:51:40 +0000 (+0000) Subject: bug [ 1007046 ] os.startfile() doesn't accept Unicode filenames X-Git-Tag: v2.4.2c1~31 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a38d85fbc2ec8a50d8529cd2629829ab383dc09e;p=thirdparty%2FPython%2Fcpython.git bug [ 1007046 ] os.startfile() doesn't accept Unicode filenames --- diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 2ee6a37c2edd..a116c41d5e10 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -7182,7 +7182,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);