Sfoglia il codice sorgente

SetConsoleOutputCP for win

雾聪 2 anni fa
parent
commit
0627b354c5

+ 2 - 1
runtime/websocket/bin/funasr-wss-client-2pass.cpp

@@ -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;

+ 1 - 0
runtime/websocket/bin/funasr-wss-client.cpp

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

+ 4 - 0
runtime/websocket/bin/funasr-wss-server-2pass.cpp

@@ -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;

+ 4 - 0
runtime/websocket/bin/funasr-wss-server.cpp

@@ -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]);