On MSWin and OSX, this call always returns the correct value (utf-8 on OSX, 'mbcs' on MSWin), but on Linux the return value is bizarrely dependent upon the environment. Replace it with a GrampsLocale function which returns 'utf-8' (the correct value for most Linux file systems) regardless of the environment. Also replace its use in print and write functions: It's the encoding of paths in the filesystem, not of the files's content, nor of the terminal's capabilities. The former is almost always utf-8 as long as we write the file, the latter is given by sys.stdout.encoding. Use the 'backslashreplace' error handler to avoid exceptions when we need to output unicode text to an ASCII terminal. svn: r21146
11 KiB
11 KiB