How do you find valid locale names?
I am currently using MAC OS X.
But information about other platforms would also be useful.
#include <fstream>
#include <iostream>
int main(int argc,char* argv[])
{
try
{
std::wifstream data;
data.imbue(std::locale("en_US.UTF-16"));
data.open("Plop");
}
catch(std::exception const& e)
{
std::cout << "Exception: " << e.what() << "\n";
throw;
}
}
% g++ main.cpp
% ./a.out
Exception: locale::facet::_S_create_c_locale name not valid
Abort