15/11/05 16:28:22.05 IhTKFi3p.net
>>84
setlocale (LC_ALL, "ja.utf8");
std::cout << "ja.utf8->" << setlocale(LC_ALL, 0) << std::endl;
setlocale (LC_ALL, "utf8");
std::cout << "utf8->" << setlocale(LC_ALL, 0) << std::endl;
setlocale (LC_ALL, "ja_JP.UTF-8");
std::cout << "ja_JP.UTF-8->" << setlocale(LC_ALL, 0) << std::endl;
setlocale (LC_ALL, "ja_JP.utf8");
std::cout << "ja_JP.utf8->" << setlocale(LC_ALL, 0) << std::endl;
setlocale (LC_ALL, "japanese");
std::cout << "japanese->" << setlocale(LC_ALL, 0) << std::endl;
setlocale (LC_ALL, "JPN");
std::cout << "JPN->" << setlocale(LC_ALL, 0) << std::endl;
setlocale (LC_ALL, "UTF-8");
std::cout << "UTF-8->" << setlocale(LC_ALL, 0) << std::endl;
setlocale (LC_ALL, "japanese.sjis");
std::cout << "japanese.sjis->" << setlocale(LC_ALL, 0) << std::endl;
結果:
ja.utf8->C
utf8->C
ja_JP.UTF-8->C
ja_JP.utf8->C
japanese->Japanese_Japan.932
JPN->Japanese_Japan.932
UTF-8->Japanese_Japan.932
japanese.sjis->Japanese_Japan.932