Setup path encoding for Windows in tests.
authorCarl Hetherington <cth@carlh.net>
Wed, 25 Dec 2024 15:32:34 +0000 (16:32 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 26 Dec 2024 15:46:02 +0000 (16:46 +0100)
Then we can create boost::filesystem::paths from UTF-8 literals without
everything going west.

test/file_naming_test.cc
test/test.cc

index 2aa81cd4f9cecafd0cee4c662c8957b9fb837723..2953046b5433891d171797323f183e28ae00e525 100644 (file)
@@ -109,12 +109,6 @@ BOOST_AUTO_TEST_CASE (file_naming_test2)
 
        Config::instance()->set_dcp_asset_filename_format (dcp::NameFormat ("%c"));
 
-#ifdef DCPOMATIC_WINDOWS
-       /* This is necessary so that the UTF8 string constant below gets converted properly */
-       std::locale::global(boost::locale::generator().generate(""));
-       boost::filesystem::path::imbue(std::locale());
-#endif
-
        auto r = make_shared<FFmpegContent>("test/data/flät_red.png");
        auto g = make_shared<FFmpegContent>("test/data/flat_green.png");
        auto b = make_shared<FFmpegContent>("test/data/flat_blue.png");
index fe02867998711e41409efc2b576c54a782311b89..0f95057941eb75d5dec25b115d57f87928b302f2 100644 (file)
@@ -162,6 +162,7 @@ struct TestConfig
                dcpomatic_setup ();
                setup_test_config ();
                capture_ffmpeg_logs();
+               dcpomatic_setup_path_encoding();
 
                EncodeServerFinder::drop();