I have seen the following warning recently through my VS2010.
Warning 21 warning C4819: The file contains a character that cannot be represented in the current code pag
at line 176:
BOOST_ASSERT(0); // §27.4.3.2 allows undefined-behaviour here
You see, there is a character before 27 in the above line.
I met this problem in my project and tried to modify all non-unicode characters. But I had to give up and found a another way, as there were too many files with such problem (even though all of them are in comments).
Then I found a quick way to fix this by setting 'system locale'.
Control Panel -> Clock,Language,and Region -> Region and Language ->
Administrative -> Language for non-Unicode programs -> Change system locale -> English
I think this could fix your problem if your 'system locale' is not English.
https://stackoverflow.com/a/37871883/3148107
You can use the regex shown above in Visual Studio to locate those characters. Here is the Regex: [^\x00-\x7F]
You can use Notepad++ to find all Unicode characters in a file using a regular expression:
[^\x00-\x7F]
in the Find what box and hit the Find Next button to see what you get.After you find the Unicode character(s), you can remove/change them, change the encoding back to ANSI, and save the file.
You don't have to use Notepad++, of course. The RegEx will work in other text editors, e.g., Sublime Text.
Basically, you might have compiled a file which is encoded in another charset that is not the default charset of your operating system. One way is to delete those characters that can not decoded by your default encoding, but I prefer the other way which is just using Notepad++ to trans-coding your file. To achieve this goal, click Encoding->Convert To xxx, where xxx is your operating system default encoding.