You have to make sure that you read data with the encoding set to whatever the data is encoded in. If the data is turkish text, probably you need to do something like QTextCodec::setCodecForLocale(QTextCodec::codecFor Name("eucTR"));

Note that it probably is better not to set that globally, but only for your input file. See QTextStream::setCodec().


(Note that setCodecForTr sets the codec to be used for translations (the tr("...") calls in Qt code), the "Tr" has nothing to do with Turkish here ;-)

HTH