From b549b20d2c4803029df1978fc2679186eaf622d9 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 15 May 2017 11:16:32 -0700 Subject: [PATCH] Convert arg string to utf8 on Windows --- atom/browser/node_debugger.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/atom/browser/node_debugger.cc b/atom/browser/node_debugger.cc index 31898d4c251..0a7bece6b47 100644 --- a/atom/browser/node_debugger.cc +++ b/atom/browser/node_debugger.cc @@ -5,6 +5,7 @@ #include "atom/browser/node_debugger.h" #include "base/command_line.h" +#include "base/strings/utf_string_conversions.h" #include "libplatform/libplatform.h" namespace atom { @@ -21,8 +22,13 @@ void NodeDebugger::Start() { return; node::DebugOptions options; - for (auto& arg : base::CommandLine::ForCurrentProcess()->argv()) + for (auto& arg : base::CommandLine::ForCurrentProcess()->argv()) { +#if defined(OS_WIN) + options.ParseOption(base::UTF16ToUTF8(arg)); +#else options.ParseOption(arg); +#endif + } if (options.inspector_enabled()) { // Use custom platform since the gin platform does not work correctly