From 3d184b3c39e4137278dc36af886654ca86eac29b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 25 Dec 2024 16:32:34 +0100 Subject: Setup path encoding for Windows in tests. Then we can create boost::filesystem::paths from UTF-8 literals without everything going west. --- test/file_naming_test.cc | 6 ------ test/test.cc | 1 + 2 files changed, 1 insertion(+), 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("test/data/flät_red.png"); auto g = make_shared("test/data/flat_green.png"); auto b = make_shared("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(); -- cgit v1.2.3