]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bug [ 1007046 ] os.startfile() doesn't accept Unicode filenames
authorGeorg Brandl <georg@python.org>
Wed, 14 Sep 2005 20:51:40 +0000 (20:51 +0000)
committerGeorg Brandl <georg@python.org>
Wed, 14 Sep 2005 20:51:40 +0000 (20:51 +0000)
Modules/posixmodule.c

index 2ee6a37c2eddb250b45c706d113c4944d1417c2b..a116c41d5e10c183b3a74ec1c19c3446cfe38547 100644 (file)
@@ -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);