title: How to use Unicode charaters in QString/QDebug?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/7667407/i-lose-unicodeness-when-qdebuging-after-instancing-a-qapplication">I lose “unicodeness” when qDebug()ing after instancing a QApplication</a>  </p>
  </blockquote>
  
  
  
  <p>I am trying to use Unicode characters in my project, but the Unicode characters are converting to some values(ex: ?).</p>
  
  <pre><code>#include &lt;QtCore/QCoreApplication&gt;
  #include &lt;QTextCodec&gt;
  #include &lt;QDebug&gt;
  int main(int argc, char *argv[]) {
    QCoreApplication a(argc, argv);
    QTextCodec *codec = QTextCodec::codecForName("UTF-8");
    QTextCodec::setCodecForCStrings(codec);
    //Unicode character here is '
    QString unicode = "Hello I’ve to go";
    qDebug() &lt;&lt; "Unicode String: " &lt;&lt; unicode;
    return a.exec();
  }
  </code></pre>
  
  <p>The above code prints the string value as <strong>Hello I?ve to go</strong></p>