SetConsoleOutputCP for win

This commit is contained in:
雾聪 2023-12-18 09:55:03 +08:00
parent a0108271ad
commit 0627b354c5
4 changed files with 11 additions and 1 deletions

View File

@ -475,7 +475,8 @@ class WebsocketClient {
int main(int argc, char* argv[]) {
#ifdef _WIN32
SetConsoleOutputCP(65001);
#include <windows.h>
SetConsoleOutputCP(65001);
#endif
google::InitGoogleLogging(argv[0]);
FLAGS_logtostderr = true;

View File

@ -342,6 +342,7 @@ class WebsocketClient {
int main(int argc, char* argv[]) {
#ifdef _WIN32
#include <windows.h>
SetConsoleOutputCP(65001);
#endif
google::InitGoogleLogging(argv[0]);

View File

@ -25,6 +25,10 @@ void GetValue(TCLAP::ValueArg<std::string>& value_arg, string key,
}
int main(int argc, char* argv[]) {
#ifdef _WIN32
#include <windows.h>
SetConsoleOutputCP(65001);
#endif
try {
google::InitGoogleLogging(argv[0]);
FLAGS_logtostderr = true;

View File

@ -26,6 +26,10 @@ void GetValue(TCLAP::ValueArg<std::string>& value_arg, string key,
}
int main(int argc, char* argv[]) {
#ifdef _WIN32
#include <windows.h>
SetConsoleOutputCP(65001);
#endif
try {
google::InitGoogleLogging(argv[0]);