Afficher un message
Vieux 23/02/2008, 17h19   #12
Ioannis Vranos
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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.
  Réponse avec citation
 
Page generated in 0,04522 seconds with 9 queries