85a1c39092
The problem is really that the paths get munged into strings in the system codepage, losing or misinterpreting most Unicode. Python's os module is smart enough to encode the unicode to the file system encoding, but the bsddb module needs a little help. Provide a new function, constfunc.get_env_var(name, default=None) to cleanly import Unicode environment variables in Windows and use it in place of all instances of foo = os.environ['BAR] or foo = os.environ.get('BAR'). Os path functions are smart enough to convert unicode to the file system encoding on their own, but Db functions aren't, so provide an _encode function in gen.db.write.py and apply it where a path is being passed to DBEnv.open(). Also convert paths from the UI to unicode from 'utf8' rather than sysfilesystemencoding. The latter happens to be correct most of the time on Linux and OSX but is wrong on Windows. |
||
---|---|---|
.. | ||
docgen | ||
test | ||
__init__.py | ||
alive.py | ||
callback.py | ||
callman.py | ||
cast.py | ||
config.py | ||
configmanager.py | ||
db.py | ||
debug.py | ||
file.py | ||
grampslocale.py | ||
id.py | ||
image.py | ||
keyword.py | ||
lds.py | ||
libformatting.py | ||
location.py | ||
maclocale.py | ||
place.py | ||
resourcepath.py | ||
string.py | ||
unknown.py |