cmd:默认终端部分以UTF8显示。
This commit is contained in:
@@ -51,6 +51,7 @@ if(WIN32)
|
|||||||
if(DEFINED XP_PLATFORM_SUPPORT)
|
if(DEFINED XP_PLATFORM_SUPPORT)
|
||||||
message(STATUS "Support Windows XP platform => ${XP_PLATFORM_SUPPORT}.")
|
message(STATUS "Support Windows XP platform => ${XP_PLATFORM_SUPPORT}.")
|
||||||
add_definitions(-D_WIN32_WINNT=0x0501)
|
add_definitions(-D_WIN32_WINNT=0x0501)
|
||||||
|
add_definitions(-DXP_PLATFORM)
|
||||||
else()
|
else()
|
||||||
#add_definitions(-D_WIN32_WINNT=0x0601)
|
#add_definitions(-D_WIN32_WINNT=0x0601)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -4,10 +4,19 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
#if defined(_WIN32)
|
||||||
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "Console.h"
|
#include "Console.h"
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#if defined(_WIN32)
|
||||||
|
SetConsoleOutputCP(CP_UTF8);
|
||||||
|
#endif
|
||||||
|
|
||||||
auto ver = Util::GetVersion();
|
auto ver = Util::GetVersion();
|
||||||
std::cout << "==============> " << ver.toStdString() << std::endl;
|
std::cout << "==============> " << ver.toStdString() << std::endl;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user