[root@VM_207_53_centos /]# locale
LANG=C
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
我看网上全是utf-8 怎么到我这就是c了
在函数setlocale 有下面的说明文字
The locale argument is a pointer to a string that specifies the name of the locale. If locale points to an empty string, the locale is the implementation-defined native environment. A value of C specifies the minimal ANSI conforming environment for C translation. The C locale assumes that all char data types are 1 byte and that their value is always less than 256.
At program startup, the equivalent of the following statement is executed:
setlocale( LC_ALL, "C" );
说是所有的字符集都是ANSI,假设字符都是1个字节,都小于256
我想这里的配置应该和这个一个意思吧。(我从MSDN 看到了,应该和linux 一样吧。)