#include #include #include int main(int argc, char** argv) { QTextCodec* codec = QTextCodec::codecForName("windows-1252"); QString str = QString::fromUcs4( U"ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ"); // This should be false, but it is true with the ICU backend codec->canEncode(str); // This outputs a lot of question marks std::puts(codec->fromUnicode(str).constData()); }