Character Set Compilation in Visual Studio [Translated]

Constants contain line breaks

visual studio

Therefore, it is so

The cited references provide a detailed explanation of the cause of the problem, based on principles

Regarding encoding, __INLINE_CODE_0__BOLD_3/source-charsetBOLD_4/execution-charset addresses the file’s original encoding and the encoding of bytes within the character array after compilation. These two options generally resolve encoding issues.

For example, Chinese characters are displayed normally on the console

CMake settings for Visual Studio

if( WIN32 )
    message( STATUS "Configuring trade on WIN32")
    set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /source-charset:utf-8 /execution-charset:gbk")
endif()

References

A financial IT programmer's tinkering and daily life musings
Built with Hugo
Theme Stack designed by Jimmy