title: Why doesn't QString treat special characters correctly, when no QCoreApplication has been instantiated?
body: <p>I started writing a very basic text manipulation application in Qt, without a GUI. 
  My text contained special characters, but somehow I was not able to print those special characters, no matter what I did. 
  I then noticed, that after adding a <code>QCoreApplication</code> instance (which I had previously removed, because I thought I wouldn't need it), everything worked just as it should. </p>
  
  <p>Here is the code:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>#include &lt;QCoreApplication&gt;
  #include &lt;QString&gt;
  #include &lt;QDebug&gt;
  
  int main(int argc, char *argv[])
  {
      QCoreApplication a(argc, argv);
  
      QString s(QString::fromUtf8("aä\xc3\xa4")); // aää
  
      qDebug() &lt;&lt; s;
      qDebug() &lt;&lt; s.toAscii();
      qDebug() &lt;&lt; s.toLatin1();
      qDebug() &lt;&lt; s.toUtf8();
      qDebug() &lt;&lt; s.toLocal8Bit();
      qDebug("%s", qPrintable(s));
  
      qDebug("%i", s.length());
      qDebug("%i", strlen(qPrintable(s)));
  
      return 0;
  }
  </code></pre>
  
  <p>Output with <code>QCoreApplication</code> (everything works as it should):</p>
  
  <pre class="lang-none prettyprint-override"><code>"aää" 
  "aää" 
  "aää" 
  "aÃ¤Ã¤" 
  "aÃ¤Ã¤" 
  aää
  3
  5
  </code></pre>
  
  <p>Output after commenting out the line, where <code>QCoreApplication</code> is defined (special characters are not shown anymore):</p>
  
  <pre class="lang-none prettyprint-override"><code>"a" 
  "a" 
  "a" 
  "a" 
  "a" 
  a
  3
  1
  </code></pre>
  
  <p>Note, that already after calling <code>qPrintabable(s)</code>, the special characters are already removed. 
  I tested this to be sure, that <code>QDebug</code> is not the problem.</p>
  
  <p>I also checked if the file is really encoded in UTF-8. </p>
  
  <p>Why doesn't QString treat special characters correctly, when no <code>QCoreApplication</code> has been instantiated?</p>