Hello folks,

I've got a problem and I really don't know how to solve this.

For instance, I've got a QString with a german umlaut build with unicode like this:

QString str = "\u00fc"; // works got "ü" as german umlaut
If I have a text file which contains the unicode characters qt does not transform it to german umlauts. example:

Qt Code:
  1. QFile f("test.txt");
  2. f.open(QIODevice::ReadOnly);
  3. QString str = f.readAll();
To copy to clipboard, switch view to plain text mode 


Can anyone explain me why? I have tested the codecs example with my text file and again he does not replace the characters and I have used QtextStream and QTextEncoder classes with no success. Anyone can help ?