Compile the VC ++ program warning C4819 to quickly solve the problem, warningc4819

Source: Internet
Author: User

[Convert] compile the VC ++ program warning C4819 to quickly solve the problem, warningc4819
Article from: http://www.cppblog.com/API/archive/2012/11/12/195056.aspx

The following warning is prompted when compiling the VC ++ program:

Warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss

As it is only a warning and does not affect normal compilation, it does not attract much attention. This was also the case at the beginning. However, the number of times later appeared increased, and the warning was found to be the same as that during program debugging.
You can't stop at the breakpoint, and you can't Debug it after you click it. The culprit is this warning. After correcting this warning, we can Debug it.

The following describes how to eliminate this warning.

This warning indicates that one or more characters in the file are not Unicode characters! This character must be converted to a Unicode character.

Difficulty: the compilation information does not show the character or the line in which the character appears. Difficult to find, or even impossible tasks!

I found a lot of information on the network and did not find a solution. Because everyone does not pay attention to this warning that does not affect compilation. Later, I found a solution on a foreign website. This method does not need to know which character is playing tricks!

Solution: Open the warning file, Ctrl + A select all, and then select file> advanced save options from the file menu. In the displayed options, select the new encoding method as follows: UNICODE codepage 1200, click OK to solve the problem.

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.