#include <iostream>
#include <clocale>
#include <string>
int main() {
std::setlocale(LC_ALL, "en_US.utf8");
std::wstring str(L"Τὴ γλῶσσα μοῦ ἔδωσαν");
std::wcout << str << std::endl;
std::wcerr << str << std::endl;
}
This produces no output on the terminal.
How can I get it to produce UTF-8 output? I figure that ought to be something supported by C++.
I am aware of the utfcpp library, which I am using, but the question is specifically whether there is a stdlib way to print out UTF8.