QString tempString;QByteArray recordData;tempString = recordData.mid(fieldsItem->fieldOffset,fieldsItem->fieldSize);
QTextCodec *codec = QTextCodec::codecForName("IBM 866");QString str = codec->toUnicode(recordData.mid(fieldsItem->fieldOffset,fieldsItem->fieldSize));
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("Windows-1251"));QTextCodec::setCodecForTr(QTextCodec::codecForName("Windows-1251"));QTextCodec::setCodecForLocale(QTextCodec::codecForName("Windows-1251"));QString trava_str = tr("Трава");