如果我的 Linux 语言环境输出都是 'C',如何改进?

How to improve if my Linux locale outputs are all 'C'?

[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一样。)