summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-11-25 14:07:06 +0000
committerCarl Hetherington <cth@carlh.net>2013-11-25 14:07:06 +0000
commit0882a398a0737568b49d1bcae6d4d24c4c39492d (patch)
treebe7458895e390239062b2f0902c96695d7c0f542 /src
parent5122ff8a5b7471f94c8610d8bab2f5899b2ba1a1 (diff)
Add voodoo to set locale for boost::filesystem.
Diffstat (limited to 'src')
-rw-r--r--src/lib/util.cc7
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 ();