[Python-Dev] Unicode Imports

"Martin v. Löwis" martin at v.loewis.de
Sat Sep 9 09:23:32 CEST 2006

Nick Coghlan schrieb:
> So this is taking something that *already works properly on POSIX
> systems* and making it work on Windows as well.

I doubt it does without side effects. For example, an application that
would go through sys.path, and encode everything with
sys.getfilesystemencoding() currently works, but will break if the patch
is applied and non-mbcs strings are put on sys.path.

Also, what will be the effect on __file__? What value will it have
if the module originates from a sys.path entry that is a non-mbcs
unicode string? I haven't tested the patch, but it looks like
__file__ becomes a unicode string on Windows, and remains a byte
string encoded with the file system encoding elsewhere. That's also
a change in behavior.


More information about the Python-Dev mailing list