Another linux build fix.
[dcpomatic.git] / test / file_naming_test.cc
index 160fc08134416fc6a947e764cc94573df0f4c48e..ebc89d6b1130e3aec55abfbb3ad25dc10bfa52b0 100644 (file)
@@ -20,7 +20,7 @@
 
 /** @file  test/file_naming_test.cc
  *  @brief Test how files in DCPs are named.
- *  @ingroup specific
+ *  @ingroup feature
  */
 
 #include "test.h"
@@ -29,6 +29,9 @@
 #include "lib/ffmpeg_content.h"
 #include "lib/dcp_content_type.h"
 #include "lib/video_content.h"
+#ifdef DCPOMATIC_WINDOWS
+#include <boost/locale.hpp>
+#endif
 #include <boost/test/unit_test.hpp>
 #include <boost/regex.hpp>
 
@@ -111,6 +114,13 @@ BOOST_AUTO_TEST_CASE (file_naming_test2)
        shared_ptr<Film> film = new_test_film ("file_naming_test2");
        film->set_name ("file_naming_test2");
        film->set_dcp_content_type (DCPContentType::from_isdcf_name ("FTR"));
+
+#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
+
        shared_ptr<FFmpegContent> r (new FFmpegContent("test/data/flät_red.png"));
        film->examine_and_add_content (r);
        shared_ptr<FFmpegContent> g (new FFmpegContent("test/data/flat_green.png"));