In article <[EMAIL PROTECTED]>, "Martin v. Lowis" <[EMAIL PROTECTED]> wrote:
Hm, maybe more a windows question than a python question...
The real question here is: why does Python not support arbitrary Unicode strings on sys.path? It could, in principle, atleast on Windows NT+ (and also on OSX). Patches are welcome.
Works for me on OSX 10.3.6, as it should: prior to using the sys.path entry, a unicode string is encoded with Py_FileSystemDefaultEncoding.
For this conversion "mbcs" will be used on Windows machines, implying that such conversions are made using the current system Ansi codepage.
(As a matter of interest: What is this on OSX?). This conversion is likely to be useless for unicode directory names containing characters that do not have a mapping to a character in this particular codepage.
The technique described by Martin may solve the problem for what in this case are Japanese characters, but what if I have directory names from another language group, such as simpliefied Chinese, as well?
The only way to get around this is to allow - as Martin suggests - arbitrary unicode strings in sys.path on those platforms that may have unicode file names.
-- Vincen Wehren
I'm not sure how well it works together with zipimport, though.
Just
-- http://mail.python.org/mailman/listinfo/python-list