>> But, Windows locale encoding is not support all of unicode chars.
>> To support Unicode filenames, I can think following ways.
>> 1. Use Py3k ;-)
>> 2. Use ctypes.GetCommandLineW()
>> 3. Use urlencode for filenames. ( file:///D:/%uXXXX...)
>> 4. pass filenames with stdin instead of commandline arguments.
>>
>> ** Attachment added: "decode filenames with get_user_encoding()"
>> http://launchpadlibrarian.net/27783268/fenc2.patch
>>
>
> The way we get the command line has changed in recent versions. We now
> use GetCommandLineW function (IIRC), and we expect the arguments passed
> to main() are going to be Unicode arguments.
I read Python source code and found that py2k uses main(int, char**) and py3k
uses wmain(int, wchar_t**). I couldn't find GetCommandLineW.
So I think there are no way to get sys.argv in unicode on py2k.
>> But, Windows locale encoding is not support all of unicode chars. GetCommandLineW () /D:/%uXXXX. ..) encoding( )" launchpadlibrar ian.net/ 27783268/ fenc2.patch
>> To support Unicode filenames, I can think following ways.
>> 1. Use Py3k ;-)
>> 2. Use ctypes.
>> 3. Use urlencode for filenames. ( file://
>> 4. pass filenames with stdin instead of commandline arguments.
>>
>> ** Attachment added: "decode filenames with get_user_
>> http://
>>
>
> The way we get the command line has changed in recent versions. We now
> use GetCommandLineW function (IIRC), and we expect the arguments passed
> to main() are going to be Unicode arguments.
I read Python source code and found that py2k uses main(int, char**) and py3k
uses wmain(int, wchar_t**). I couldn't find GetCommandLineW.
So I think there are no way to get sys.argv in unicode on py2k.