summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-11-26 10:01:08 +0000
committerCarl Hetherington <cth@carlh.net>2013-11-26 10:01:08 +0000
commitacee0fce224b9376c55f2b58f1ff700496b185f3 (patch)
treef4986cee81c48217e1f9e25e1bd3d68b96c131f6
parent38add112b389e16d25130ad762eb8c31ca06c977 (diff)
Comment.
-rw-r--r--src/lib/util.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc
index e76b7aa67..e70440271 100644
--- a/src/lib/util.cc
+++ b/src/lib/util.cc
@@ -282,6 +282,14 @@ dcpomatic_setup ()
/* 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()).
+
+ After this, constructing boost::filesystem::paths from strings
+ converts from UTF-8 to UTF-16 inside the path. Then
+ path::string().c_str() gives UTF-8 and
+ path::c_str() gives UTF-16.
+
+ This is all Windows-only. AFAICT Linux/OS X use UTF-8 everywhere,
+ so things are much simpler.
*/
std::locale::global (boost::locale::generator().generate (""));
boost::filesystem::path::imbue (std::locale ());