Quantcast

Spanish Characters

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Spanish Characters

Papa
This function, when running on my Win8.1 command prompt it displays the
desired Spanish characters, but when I press F6, NetBeans 8.2 displays
only squares instead of the Spanish letters.

How can I solve this problem?

void ascii_es() {
         setlocale(LC_ALL, "es_ES.utf8");

         std::vector<int> list;
         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 i : list) {
             std::wstring a;
             a = i;
             std::wcout << L"Alt + " << i << L": " << a << std::endl;
         }
         std::cout << "ñ" << std::endl; //<<-- NB displays it correctly
     }


Thanks in advance.

--
ArbolOne.ca
Using FireFox and Thunderbird.
ArbolOne is composed of a group of students and volunteers
dedicated to providing free services to charitable organizations.

Loading...