diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-11-25 14:07:06 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-11-25 14:07:06 +0000 |
| commit | 0882a398a0737568b49d1bcae6d4d24c4c39492d (patch) | |
| tree | be7458895e390239062b2f0902c96695d7c0f542 /src | |
| parent | 5122ff8a5b7471f94c8610d8bab2f5899b2ba1a1 (diff) | |
Add voodoo to set locale for boost::filesystem.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/util.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc index 4a9998141..d99c3801f 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -277,6 +277,13 @@ dcpomatic_setup () backtrace_file /= g_get_user_config_dir (); backtrace_file /= "backtrace.txt"; SetUnhandledExceptionFilter(exception_handler); + + /* Dark voodoo which, I think, gets boost::filesystem::path to + correctly convert UTF-8 strings to paths, and also paths + back to UTF-8 strings (on path::string()). + */ + std::locale::global (boost::locale::generator().generate ("")); + boost::filesystem::path::imbue (std::locale ()); #endif avfilter_register_all (); |
