gramps/gramps/test
John Ralls 50f514ce51 7258: Transcode FS paths to avoid a crash
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.
2014-03-25 15:45:41 -07:00
..
test 7258: Transcode FS paths to avoid a crash 2014-03-25 15:45:41 -07:00
__init__.py GEPS 026: Replace 'make' for Gramps build 2012-09-30 11:55:52 +00:00
regrtest.py Skip .git instead of .svn directories 2013-11-09 00:11:30 +00:00
test_util.py typos 2013-04-19 16:57:48 +00:00