编译VC++程序的时候出现如下提示警告:
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
该警告的意思是:在该文件中有一个或多个字符不是Unicode字符!要求把这个字符变成Unicode字符。
解决办法:
- 打开出现warning的文件,Ctrl+A全选,然后在文件菜单:file->advanced save options;
- 在弹出的选项中选择新的编码方式为:UNICODE codepage 1200,点击确定。
- 问题解决。
参考:
https://www.yuque.com/docs/share/ec7f9fab-dd76-41c0-be23-64ea1572afdf