Issue 1451503: os.startfile() still doesn't work with Unicode filenames (original) (raw)

Created on 2006-03-16 18:08 by roee88, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
startfile-unicode.diff georg.brandl,2006-03-31 15:03
Messages (8)
msg27797 - (view) Author: roee88 (roee88) Date: 2006-03-16 18:08
From 2.4.2 changelog: >>>Bug #1007046: os.startfile() did not accept unicode strings encoded in the file system encoding. If the filename is unicode type and the encoding isn't the default system encoding, all "unknown" (to system encoding) characters are replaced by "?". This is causing the os.startfile() to fail with WindowsError: [Errno2] Because the filename doesn't really have the "?".
msg27798 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-03-19 10:49
Logged In: YES user_id=21627 Well, it does work on Unicode strings when all characters from the string come from the system code page; this got implemented in response to bug #1007046. To fix this, the implementation should use ShellExecuteW (except on Win9x). Would you like to work on a patch? As a work-around, change your system code page so your file names are supported.
msg27799 - (view) Author: roee88 (roee88) Date: 2006-03-22 12:00
Logged In: YES user_id=1111143 Sorry, but I can't work on a patch.
msg27800 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-03-31 15:03
Logged In: YES user_id=849994 Attaching patch. Please check.
msg27801 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-04-03 12:21
Logged In: YES user_id=21627 The patch looks fine. Please apply.
msg27802 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-04-03 12:26
Logged In: YES user_id=849994 Rev. 43586.
msg27803 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2006-04-03 19:29
Logged In: YES user_id=11105 The patched file does not even compile. I suggest a more careful review, or running the testsuite (on affected system), or even better, a unittest.
msg27804 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-04-03 23:04
Logged In: YES user_id=21627 For the record: the patch *does* compile (though with warnings), and passes the test suite, see the buildbot log files for details. Nevertheless, there were two serious bugs in the code, which I fixed in 43611. Thanks for pointing that out.
History
Date User Action Args
2022-04-11 14:56:15 admin set github: 43041
2006-03-16 18:08:27 roee88 create