In Visual Studio, if the source file contains Chinese, when the source file is encoded as UTF8, the C4819 file contains the characters that cannot be represented in the current code page (936). Please save the file in Unicode format to prevent data loss "warning.
There are two ways to do this: "Block warning" or "Change file encoding."
Shielding warning
This method can be used in cases where the Chinese language appears in the comment section. If Chinese appears in a string used by the program, then the Chinese character of the string will be garbled. At this point, only the "Change file encoding" method can be used.
In the Project Properties dialog box, choose the "C + +", "Advanced", "Disable Specific warnings" and enter "4819".
In the "CMake" configuration file, enter the following:
Set_target_properties (<target_name> properties /wd"4819" )
Change file encoding
Select the File menu, Advanced Save Options menu item, and in the Advanced Save Options dialog box, change encoding from Unicode (UTF-8 unsigned)-code page 65001 to Simplified Chinese (GB2312)-code page 936 or Unicode (UTF-8 with signature) -code page 65001 ".
Reprinted from: http://blog.csdn.net/icbm/article/details/50579466
Go Visual Studio 2015 source file encoding issues (936)