Go Visual Studio 2015 source file encoding issues (936)

Source: Internet
Author: User

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)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.