c++11 - C++ Terminal applications in spanish -


this code:

void ascii_es() {     std::vector<int> list;     std::wstring a;      list.push_back( 160 );     list.push_back( 181 );     list.push_back( 130 );     list.push_back( 144 );     list.push_back( 161 );     list.push_back( 214 );     list.push_back( 162 );     list.push_back( 224 );     list.push_back( 168 );     list.push_back( 164 );     list.push_back( 165 );     list.push_back( 163 );     list.push_back( 233 );     for(auto : list) {         = i;         wcout << l"alt + " << << l": " << << std::endl;     } } 

nicely displays spanish letters on win10 console, code

void displayes() {     std::locale myloc;      std::locale es("es");     std::locale::global(es);     std::wcout.imbue(es);      std::wcout << l"has escogido espa" << static_cast<char>(164) << "ol" << std::endl;      std::locale::global(myloc);     std::wcout.imbue(myloc); } 

does not display letter ñ (alt+164) @ all.

my question is, why vc++-12 program works in first example, in second not?

the examples 2 functions in same program, display differently on terminal?

can help?


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -