Hi,

I'm trying to output unicode in a (Win32) console application, without success until now.
I read on a thread that I should use a QTextStream for this. I tried but did not get any output.

Here my code:
Qt Code:
  1. int main(int argc, char *argv[])
  2. {
  3. QCoreApplication a(argc, argv);
  4.  
  5. QTextStream qStdOut(stdout, QIODevice::WriteOnly);
  6. // qStdOut.setCodec("UTF-16");
  7. QString unicodeString(QChar(0x9788));
  8. qStdOut << QString("QTextStream: ") << unicodeString << QChar('\n');
  9. std::cout << "cout: " << (char*)unicodeString.utf16() << std::endl;
  10. printf("printf: %ls\n", unicodeString.utf16());
  11.  
  12. return a.exec();
  13. }
To copy to clipboard, switch view to plain text mode 

The output I get is:
cout: êù
printf:
The standard cout/printf don't output unicode, and the QTextStream nothing at all... no "QTextStream: ☼"
Is there something I missed?