diff --git a/src/google/protobuf/compiler/command_line_interface.cc b/src/google/protobuf/compiler/command_line_interface.cc index 8d4e455d38ac1..71dcc46544f71 100644 --- a/src/google/protobuf/compiler/command_line_interface.cc +++ b/src/google/protobuf/compiler/command_line_interface.cc @@ -1788,7 +1788,7 @@ bool CommandLineInterface::ExpandArgumentFile( CommandLineInterface::ParseArgumentStatus CommandLineInterface::ParseArguments( int argc, const char* const argv[]) { - executable_name_ = argv[0]; + // executable_name_ = argv[0]; std::vector arguments; for (int i = 1; i < argc; ++i) { @@ -2011,7 +2011,7 @@ CommandLineInterface::InterpretArgument(const std::string& name, if (name.empty()) { // Not a flag. Just a filename. if (value.empty()) { - std::cerr + std::wcerr << "You seem to have passed an empty string as one of the " "arguments to " << executable_name_ @@ -2423,7 +2423,7 @@ CommandLineInterface::InterpretArgument(const std::string& name, void CommandLineInterface::PrintHelpText() { // Sorry for indentation here; line wrapping would be uglier. - std::cout << "Usage: " << executable_name_ << " [OPTION] PROTO_FILES"; + std::wcout << "Usage: " << executable_name_ << " [OPTION] PROTO_FILES"; std::cout << R"( Parse PROTO_FILES and generate output based on the options given: -IPATH, --proto_path=PATH Specify the directory in which to search for diff --git a/src/google/protobuf/compiler/command_line_interface.h b/src/google/protobuf/compiler/command_line_interface.h index 58e7a8ab546c7..b0bf26e2b32a1 100644 --- a/src/google/protobuf/compiler/command_line_interface.h +++ b/src/google/protobuf/compiler/command_line_interface.h @@ -333,7 +333,7 @@ class PROTOC_EXPORT CommandLineInterface { // ----------------------------------------------------------------- // The name of the executable as invoked (i.e. argv[0]). - std::string executable_name_; + std::wstring executable_name_; // Version info set with SetVersionInfo(). std::string version_info_;