[to] compile VC + + program warning C4819 quick fix

Source: Internet
Author: User
Article from: http://www.cppblog.com/API/archive/2012/11/12/195056.aspx

Compile VC + + program when the following prompt warning:

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

Because it is just a warning, does not affect the normal compilation, so does not arouse everybody much attention. I was the same when I started. But then there was a lot more, and I found this warning and when the program was debug
Unable to stop at the breakpoint, brush brushes have passed and cannot be debug at all. And the culprit is this warning, corrected this warning can be debug.

Here's how I'm going to get rid of this warning.

This warning means that there is one or more characters in the file that are not Unicode characters! Requires that this character be converted to a Unicode character.

Puzzle: There is no hint in the compilation message which character, or which line appears in the character. It is very difficult to find, even impossible task!

I found a lot of information on the Internet and found no way to solve it. Because everyone is not aware of this warning that does not affect compilation. Later on a foreign site found a solution. Quite simply, this method does not need to know exactly which character is in mischief!

Workaround: Open the file that appears warning, CTRL + a Select all, and then on the File menu: file->advanced save options, choose the new encoding method in the pop-up option: UNICODE codepage 1200, click OK, The problem is solved.

[to] compile VC + + program warning C4819 quick fix

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.