]> granicus.if.org Git - python/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 2f23f822f896c9a0f4c80bb094ff4839c82097fa..7319568241da604a2c4e09609206560fed3dbb02 100644 (file)
@@ -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);