[Python-3000] Windows, sys.argv and unicode
Giovanni Bajo
rasky at develer.com
Sun Feb 17 22:25:42 CET 2008
On Sun, 17 Feb 2008 18:09:18 +0100, Martin v. Löwis wrote:
>> Actually, I am. Py3k will already remove usage of stdio, for file input
>> and output.
>> Are you doing this work on some public branch?
>
> Yes, on the Py3k branch, and the trunk.
I looked at fileobject.c in py3k branch today and it looked like it was
still using FILE* everywhere. I'm not sure I know where to look, though.
BTW, is there a public description about how you are planning to remove
usage of stdio from fileobject? For instance, will PyFile_FromFile() be
deprecated/removed?
Generically speaking, all the UNIX world seems to speak char* and UTF-8
lately, while the Windows world speaks either char* and MBCS or wchar_t
and UTF-16[*]. How do you plan to make these two world live together?
In case the question is not clear, I elaborate with an example. Today, I
found out that putting Unicode strings in sys.path breaks zipimporter,
because it expects a 8-byte string; I guess the whole import machinery
passes char* everywhere for filenames and directories. How do you plan to
make all that code Unicode-aware on Windows?
[*] I'm not a Unicode guru, so I'm not 100% sure that the wide APIs in
Windows formally accepts UTF-16, but at least it looks like UTF-16 to
me :) It's not really relevant to the question, I reckon.
--
Giovanni Bajo
More information about the Python-3000
mailing list