/****************************************************************************** * This program prints country names in their native language. * * Copyright © 2016 Richard Lesh. All rights reserved. *****************************************************************************/ #include #include #include #include std::locale utf8loc(std::locale(), new std::codecvt_utf8); using namespace std; int main(int argc, char **argv) { setlocale(LC_ALL, "en_US.UTF-8"); wcout.imbue(utf8loc); wcin.imbue(utf8loc); wcout << L"Brasil" << endl; wcout << L"Canada" << endl; wcout << L"Deutschland" << endl; wcout << L"France" << endl; wcout << L"Italia" << endl; wcout << L"Méjico" << endl; wcout << L"Österreich" << endl; wcout << L"Perú" << endl; wcout << L"Pilipinas" << endl; wcout << L"Suid-Afrika" << endl; wcout << L"Türkiye" << endl; wcout << L"United Kingdom" << endl; wcout << L"United States" << endl; wcout << L"Việt Nam" << endl; wcout << L"Ελλάδα" << endl; wcout << L"Беларусь" << endl; wcout << L"Россия" << endl; wcout << L"ישראל" << endl; wcout << L"المملكة العربية السعودية" << endl; wcout << L"مصر" << endl; wcout << L"इंडिया" << endl; wcout << L"বাংলাদেশ" << endl; wcout << L"대한민국" << endl; wcout << L"中国" << endl; wcout << L"日本" << endl; return 0; }