【c语言】warning C4566
问题
warning C4566: character represented by universal-character-name ‘\u5E74’ cannot be represented in the current code page (1252)。
warning C4566: character represented by universal-character-name ‘\u9752’ cannot be represented in the current code page (1252)
int main()
{
int age = 10;
if (18<=age<28)
printf(“青年\n”);
return 0;
}
输出结果:
??
解决方法
C11标准中引入了 通用字符名 ( Universal Character Names )这个概念。 其实,所为的通用字符名也就是我们俗称的Unicode。
标准代码页(codepage) 1252 Windows-1252 Western European (Windows)
ANSI规定简体中文GB编码的代码页是936,所以GB编码又叫做ANSI Code Page 936
代码页的英文为Code Page,往往简称为CP。代码页也称为“内码表”,是计算机中与特定字符集(准确地说是字符集的某个字符编码方式CEF)相对应的一张字符编码对照表(这里的字符编码实