std::locale 区域一般和变量类型,输出方式有关
查看和修改locale可以通过如下方式:
std::locale loc(std::locale(), new std::ctype<char>);
std::locale::global( std::locale("") );
std::cout << "The default locale is " << std::locale().name() << '\n'
<< "The user's locale is " << std::locale("").name() << '\n'
<< "A nameless locale is " << loc.name() << '\n';
有的设置不当 会导致程序跑出异常:std::bad_cast