Unicode and Zipfile problems

Gerson Kurz gerson.kurz at t-online.de
Thu Nov 6 13:01:28 EST 2003


>but you HAVE TO care, since on MS Windows, if a filename is unicode,
>it is UTF-16 and you just cannot convert it into stream of bytes
>without messing up with encodings. UTF-16 is not even ASCII compatible,
>after all.

Well, you know, the strange thing is: I have written C and C++
programms on Win32 ever since WinNT 3.x (Unicode was not part of
16-bit Windows) and a few of these actually work. Sort of. Even though
they cannot work because they don't support UTF-16, right? 

And the same goes for many commercial or wellknown applications.
Antivir Professional? Kerio Personal Firewall? Free Agent? Paint Shop
Pro? Winzip? Winamp? Of course I don't have the source for these, but
the Dependency Viewer (from the Microsoft SDK) will show you that all
of these link with the ASCII-Versions of the Windows API. Seems like
there is a lot of broken apps out there! And the most shocking of all
- this holds true even of python23.dll: ShellExecuteA,
RegQueryValueExA, LoadStringA, LoadLibraryExA - its all ASCII!
Somebody better call for a major unicode cleanup!

But OK, I agree, the subject is somewhat boring - even though every
week somebody else runs into problems with this (see the thread
"Strange problem with encoding" from today)  there will probably be no
change introduced in Python at this point on this subject. 





More information about the Python-list mailing list