[ python-Bugs-1451503 ] os.startfile() still doesn't work with Unicode filenames

SourceForge.net noreply at sourceforge.net
Mon Apr 3 14:21:20 CEST 2006


Bugs item #1451503, was opened at 2006-03-16 19:08
Message generated for change (Comment added) made by loewis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1451503&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Extension Modules
Group: Python 2.4
Status: Open
>Resolution: Accepted
Priority: 5
Submitted By: roee88 (roee88)
>Assigned to: Georg Brandl (gbrandl)
Summary: os.startfile() still doesn't work with Unicode filenames

Initial Comment:
>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 "?".

----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2006-04-03 14:21

Message:
Logged In: YES 
user_id=21627

The patch looks fine. Please apply.

----------------------------------------------------------------------

Comment By: Georg Brandl (gbrandl)
Date: 2006-03-31 17:03

Message:
Logged In: YES 
user_id=849994

Attaching patch. Please check.

----------------------------------------------------------------------

Comment By: roee88 (roee88)
Date: 2006-03-22 13:00

Message:
Logged In: YES 
user_id=1111143

Sorry, but I can't work on a patch.

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2006-03-19 11:49

Message:
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.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1451503&group_id=5470


More information about the Python-bugs-list mailing list