转:不再经受"Warning C4819"的摧残

来源:互联网 发布:js 延时执行open 编辑:程序博客网 时间:2024/05/16 17:40
转载自:
http://blog.sina.com.cn/s/blog_403ba3dd01000aue.html
只要是用过vs2005的朋友都感受到“Warning C4819”的威力了吧。现在就让这个可恶的“Warning C4819”见鬼去吧!

Warning C4819:The file contains a character that can ot be represented in the current code page(936). save the file in unicode format to prevent data loss.

中文意思是:该文件包含不能在当前代码页中表示的字符,请将文件保存为Unicode格式,以防止数据丢失。

一般来说,这个警告没有什么影响。要想去掉这个警告的方法有:

(1)转换Code文件为Unicode格式;

(2)在Project -> Properties -> Configuration Properties -> C/C++ -> Advance 的 Disable Specific Warnings 中添加相应的警告编号:4819;

(3)或找出不符合Unicode格式的文件,然后在该文件的开始处加入下面的语句:

        # pragma warning (disable:4819)

原创粉丝点击