Kristján Valur Jónsson <krist...@ccpgames.com> added the comment: Yes. in #1552880 I tried to make as minimal a change as possible. This particular patch is still in use in EVE Online, which is installed in various strange and exotic paths in the orient..
The trick I employed there was to encode everything to utf-8 at the earliest oppertunity (current working directory, any unicode members in sys.path, etc.) and let the import.c machinery crunch that utf-8 code. This works because path separators and other such stuff doesn't change under the utf-8 encoding. As a final step, the utf8 encoded working string is converted back to unicode and native unicode API calls (on windows) are used to stat() and open() files. A similar trick could be used on unix by converting from utf-8 to whatever native encoding the stat() and open() calls expect. My patch never got accepted because I didn't have the time to put in the extra effort to make it cross platform. ---------- nosy: +krisvale _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9425> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com