setlocale()的默认设置是什么意思? setlocale()默认为“C”(“POSIX”)。但这到底是什么意思呢?它的默认字符集和语言是什么?是“en_US.utf8”吗?
最佳答案
来自 N1570:
7.11.1.1 The setlocale function
3 A value of "C" for locale specifies the minimal environment for C translation; a value of "" for locale specifies the locale-specific native environment. Other implementation-defined strings may be passed as the second argument to setlocale.
此外,来自脚注 222:
222) ISO/IEC 9945−2 specifies locale and charmap formats that may be used to specify locales for C.
这让您了解“C”在这种情况下的含义(因为脚注严格来说不是标准规范部分的一部分)。
关于c - setlocale() 的默认值是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10972547/