SHOW:
|
|
- or go back to the newest paste.
1 | #include <iostream> | |
2 | #include <locale> | |
3 | ||
4 | /**/int main() | |
5 | { | |
6 | - | std::locale loc("fr_FR.utf8"); |
6 | + | std::locale loc("fr_FR"); |
7 | - | std::cout<<"User locale: " << loc.name() << std::endl; |
7 | + | std::wcout << L"User locale: " << loc.name() << std::endl; |
8 | - | std::string str("àäâéèêëïîöôüû"); |
8 | + | std::wstring str(L"àäâéèêëïîöôüû"); |
9 | - | std::cout<<str <<std::endl; |
9 | + | std::wcout << str << std::endl; |
10 | ||
11 | - | for(std::string::iterator it=str.begin();it!=str.end();++it) |
11 | + | for(std::wstring::iterator it=str.begin();it!=str.end();++it) |
12 | { | |
13 | - | std::cout << toupper(*it, loc); |
13 | + | std::wcout << toupper(*it, loc); |
14 | } | |
15 | ||
16 | - | std::cout <<std::endl; |
16 | + | std::wcout << std::endl; |
17 | ||
18 | return 0; | |
19 | } |