Re: wcout, wprintf() only print English
Based on the MSDN example:
// basic_ios_imbue.cpp
// compile with: /EHsc
#include <iostream>
#include <locale>
int main( )
{
using namespace std;
cout.imbue( locale( "french_france" ) );
double x = 1234567.123456;
cout << x << endl;
}
that doesn't work in my GCC, this works:
#include <iostream>
#include <limits>
int main()
{
using namespace std;
cout.imbue( locale( "greek" ) );
cout<< "Δοκιμαστικό\n";
}
This also works:
#include <iostream>
#include <limits>
int main()
{
using namespace std;
cout.imbue( locale( "en_US" ) );
cout<< "Δοκιμαστικό\n";
}
Crazy stuff.
|