summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-12-25 16:32:34 +0100
committerCarl Hetherington <cth@carlh.net>2024-12-26 16:46:02 +0100
commit3d184b3c39e4137278dc36af886654ca86eac29b (patch)
treea61c90db3dcda75e3db978308fb3c7f8af95717a
parentceea64b98c1469b1e34e4897654f9671664203ee (diff)
Setup path encoding for Windows in tests.
Then we can create boost::filesystem::paths from UTF-8 literals without everything going west.
-rw-r--r--test/file_naming_test.cc6
-rw-r--r--test/test.cc1
2 files changed, 1 insertions, 6 deletions
diff --git a/test/file_naming_test.cc b/test/file_naming_test.cc
index 2aa81cd4f..2953046b5 100644
--- a/test/file_naming_test.cc
+++ b/test/file_naming_test.cc
@@ -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");
diff --git a/test/test.cc b/test/test.cc
index fe0286799..0f9505794 100644
--- a/test/test.cc
+++ b/test/test.cc
@@ -162,6 +162,7 @@ struct TestConfig
dcpomatic_setup ();
setup_test_config ();
capture_ffmpeg_logs();
+ dcpomatic_setup_path_encoding();
EncodeServerFinder::drop();