character that cannot be represented
2020-04-28 15:00
302 查看
场景说明:
环境: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):
当前设置
相关文章推荐
- warning C4819 解决方案 warning C4819: The file contains a character that cannot be represented in the cu
- warning C4819: The file contains a character that cannot be represented in the current code page (93
- VSE: The file contains a character that cannot be represented in the current code page (936).
- error C2220: warning treated as error - no 'object' file generated warning C4819: The file contains a character that cannot be represented in the current code page (936).
- warning C4819 解决方案 warning C4819: The file contains a character that cannot be represented in the c
- warning C4819: The file contains a character that cannot be represented in the current code page
- warning C4819 解决方案 warning C4819: The file contains a character that cannot be represented in the cu
- The file contains a character that cannot be represented in the current code page (936)
- warning C4819 解决方案 warning C4819: The file contains a character that cannot be represented in the cu
- warning C4819: The file contains a character that cannot be represented in the current code page
- The file contains a character that cannot be represented in the current code page
- warning C4819: The file contains a character that cannot be represented in the current code page
- warning C4819: The file contains a character that cannot be represented in the current code page
- warning C4819: The file contains a character that cannot be represented in the current code page (93
- Warning C4819:The file contains a character that can not be represented in the current code page(936
- Warning C4819:The file contains a character that can ot be represented in the current code page(936)
- Some characters cannot be mapped using "GBK" character encoding.
- CharacterEncodingFilter cannot be cast to javax.servlet.Filter 报错, 原因servlet-api.jar冲突 解决方案
- eclipse出现 Some characters cannot be mapped using "GBK" character encoding 错误代码的解决办法
- Fix SharePoint Server 2013 The SDDL string contains an invalid sid or a sid that cannot be translated. Issue