The file contains a character that cannot be represented in the current code page

场景说明:

环境:VS2005,编辑C++代码,在类的构造函数的初始化列表中删除最后一个初始化变量,出现如下的错误:

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编码,可能导致数据丢失

代码简单如下:

A::A():m_a(false),m_b(false).....,m_z(false)

{

}

删除最后一个m_z出现上述的问题,如果这种情况下,将左括号放在最后就不会出现任何的问题。

解决方案:

Ctrl+A选中当前的文档,然后点击文件,然后选中高级保存选项,在弹出的窗口中,选择如下:

编码(E):

Unicode(UTF-8带签名) - 代码页65001

行尾(L):

当前设置

时间: 2024-11-09 21:36:02

The file contains a character that cannot be represented in the current code page的相关文章

转载:Character data is represented incorrectly when the code page of the client computer differs from the code page of the database in SQL Server 2005

https://support.microsoft.com/en-us/kb/904803 Character data is represented incorrectly when the code page of the client computer differs from the code page of the database in SQL Server 2005 Email Print SYMPTOMS Consider the following scenario: In

IIS7的FTP出错: 451 No mapping for the unicode character exists in the target multi-byte code page

提示:IIS7的FTP出错: 451 No mapping for the unicode character exists in the target multi-byte code page 今天在IIS7的FTP下,直接用WIN7的资源管理器打开FTP,在传输中文文件的时候报错: 451 No mapping for the unicode character exists in the target multi-byte code page 解决方法: And it is indeed

nginx启动报错(1113: No mapping for the Unicode character exists in the target multi-byte code page)

使用windows版本的nginx启动时遇到(1113: No mapping for the Unicode character exists in the target multi-byte code page)这个错误 后来查阅资料发现是因为解压的路径里面包含有中文的缘故,只要把解压后的文件剪切到没有包含中文的目录即可解决问题

SQL server 导出平面文件时出错: The code page on Destination - 3_txt.Inputs[Flat File Destination Input].Columns[UserId] is 936 and is required to be 1252.

我在导出平面文件时:Error 0xc00470d4: Data Flow Task 1: The code page on Destination - 3_txt.Inputs[Flat File Destination Input].Columns[UserId] is 936 and is required to be 1252.(SQL Server Import and Export Wizard)有时可以验证通过,有时不可以,这是啥原因? 我试过使用Unicode编码方式(有时可以)

从源码编译Chrome(chromium)

转自:http://www.udpwork.com/item/13827.html 官网描述 http://www.chromium.org/developers/how-tos/build-instructions-windows 为啥还要写这篇博客 太久没在这里写博客 Chrome编译的教程,网上太多太多了,但各种错误(也许对他们当时的版本来说并不是错误) 好多博客没有把问题说清楚 源码打包下载(vbox的系统镜像文件) http://pan.baidu.com/s/1ntCHH1Z密码:n

VS C4819 编译错误解决方法

偶尔用别人的代码,出现: 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 百度基本的推荐做法是将文件修改编码另存为一下.有时很好奇究竟是声明字符导致该错误,直接删掉就不可以了. 这里提供另一种方法,看图: 我这里完美解决,删除之,警告

there is no source code available for the current location的解决方法

今天遇到该问题,clean and rebuild 不行. Tools->Options->Debugging->General->去掉Require source files to exactly match the original version之前的勾即可. 我怀疑可能是输入某些不兼容的编码导致,因为在编译信息中发现一个警告:warning C4819: The file contains a character that cannot be represented in

cocos2d-x 头文件中添加方法变量导致编译报错

代码如下: HelloWorldScene.h #ifndef __HELLOWORLD_SCENE_H__#define __HELLOWORLD_SCENE_H__ #include "cocos2d.h"class HelloWorld : public cocos2d::Layer{public:    // there's no 'id' in cpp, so we recommend returning the class instance pointer    stati

[转]编译VC++程序warning C4819快速解决

文章来自:http://www.cppblog.com/API/archive/2012/11/12/195056.aspx 编译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 因为只是一个war