From 3012ea43ee87eed7d617010fb721f963cfdfad69 Mon Sep 17 00:00:00 2001 From: Mathis Logemann Date: Thu, 27 Jan 2022 18:37:19 +0100 Subject: [PATCH] [visual-test] enable utf-8 console output for windows --- test/visual/run.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/visual/run.cpp b/test/visual/run.cpp index 93e855422..84b47e9a7 100644 --- a/test/visual/run.cpp +++ b/test/visual/run.cpp @@ -31,6 +31,10 @@ #include "cleanup.hpp" // run_cleanup() +#if defined(_WIN32) +#include +#endif + #ifdef MAPNIK_LOG using log_levels_map = std::map; @@ -105,6 +109,11 @@ runner::renderer_container create_renderers(po::variables_map const & args, int main(int argc, char** argv) { +#ifdef _WIN32 + SetConsoleCP(CP_UTF8); + SetConsoleOutputCP(CP_UTF8); +#endif + po::options_description desc("visual test runner"); desc.add_options() ("help,h", "produce usage message")