aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/vcpkg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'toolsrc/src/vcpkg.cpp')
-rw-r--r--toolsrc/src/vcpkg.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp
index 9da501ec0..f37d079a6 100644
--- a/toolsrc/src/vcpkg.cpp
+++ b/toolsrc/src/vcpkg.cpp
@@ -192,9 +192,13 @@ int wmain(const int argc, const wchar_t* const* const argv)
{
if (argc == 0) std::abort();
- *GlobalState::timer.lock() = ElapsedTime::create_started();
+ GlobalState::g_init_console_cp = GetConsoleCP();
+ GlobalState::g_init_console_output_cp = GetConsoleOutputCP();
+
+ SetConsoleCP(65001);
+ SetConsoleOutputCP(65001);
- // Checks::register_console_ctrl_handler();
+ *GlobalState::timer.lock() = ElapsedTime::create_started();
const std::string trimmed_command_line = trim_path_from_command_line(Strings::to_utf8(GetCommandLineW()));
@@ -212,7 +216,7 @@ int wmain(const int argc, const wchar_t* const* const argv)
if (auto p = args.sendmetrics.get()) Metrics::g_metrics.lock()->set_send_metrics(*p);
if (auto p = args.debug.get()) GlobalState::debugging = *p;
- vcpkg::Checks::register_console_ctrl_handler();
+ Checks::register_console_ctrl_handler();
if (GlobalState::debugging)
{