We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents eb141a0 + 4f4f2e1 commit 980c0a1Copy full SHA for 980c0a1
2 files changed
examples/text/uie/cpp/CMakeLists.txt
@@ -14,6 +14,9 @@
14
15
PROJECT(infer_demo C CXX)
16
CMAKE_MINIMUM_REQUIRED (VERSION 3.10)
17
+if(MSVC)
18
+ add_definitions(/utf-8)
19
+endif()
20
21
option(FASTDEPLOY_INSTALL_DIR "Path of downloaded fastdeploy sdk.")
22
examples/text/uie/cpp/infer.cc
@@ -17,6 +17,10 @@
#include "fastdeploy/text.h"
+#ifdef WIN32
+#include <windows.h>
+#endif
23
+
24
using namespace paddlenlp;
25
26
#ifdef WIN32
@@ -77,6 +81,9 @@ int main(int argc, char* argv[]) {
77
81
predictor.Predict({"2月8日上午北京冬奥会自由式滑雪女子大跳台决赛中中国选手谷"
78
82
"爱凌以188.25分获得金牌!"},
79
83
&results);
84
85
+ SetConsoleOutputCP(CP_UTF8);
86
80
87
std::cout << results << std::endl;
88
results.clear();
89
0 commit comments