K
kmw
Hi,
I have no idea what I am doing wrong. The following piece of code
should work but it does not. Any ideas?
Output is:
T
T
?
?
#include <locale>
#include <string>
int main ( )
{
std::locale loc ( "en_US.UTF-8" );
//std::locale loc ( "de_DE.utf8" ); // I also tried this
std::wcout.imbue ( loc );
std::wcout << std::toupper<wchar_t> ( L't', loc ) << L'\n';
std::wcout << std::use_facet< std::ctype<wchar_t> >(loc).toupper
( L't' ) << L'\n';
std::wcout << std::toupper<wchar_t> ( L'ä', loc ) << L'\n';
std::wcout << std::use_facet< std::ctype<wchar_t> >(loc).toupper
( L'ä' ) << L'\n';
return 0;
}
Many thanks ind advance,
Kay
I have no idea what I am doing wrong. The following piece of code
should work but it does not. Any ideas?
Output is:
T
T
?
?
#include <locale>
#include <string>
int main ( )
{
std::locale loc ( "en_US.UTF-8" );
//std::locale loc ( "de_DE.utf8" ); // I also tried this
std::wcout.imbue ( loc );
std::wcout << std::toupper<wchar_t> ( L't', loc ) << L'\n';
std::wcout << std::use_facet< std::ctype<wchar_t> >(loc).toupper
( L't' ) << L'\n';
std::wcout << std::toupper<wchar_t> ( L'ä', loc ) << L'\n';
std::wcout << std::use_facet< std::ctype<wchar_t> >(loc).toupper
( L'ä' ) << L'\n';
return 0;
}
Many thanks ind advance,
Kay