[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.