Set the option in Visual Studio or programmatically
To set this compiler option in the Visual Studio development environment
-
Open the project Property Pages dialog box. For more information, see Set C++ compiler and build properties in Visual Studio.
-
Select the Configuration Properties > C/C++ > Command Line property page.
-
In Additional Options, add the
/utf-8
option to specify your preferred encoding. -
Choose OK to save your changes.