From acee0fce224b9376c55f2b58f1ff700496b185f3 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 26 Nov 2013 10:01:08 +0000 Subject: Comment. --- src/lib/util.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/lib') 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 ()); -- cgit v1.2.3