QTextCodec *codec = QTextCodec::codecForName("IBM866");QByteArray encodedString =codec->fromUnicode(lineEdit->text());file.write(encodedString,encodedString.size());
QTextStream out(&file);out << encodedString;
QTextStream out(&file); out.setCodec("IBM866"); out << lineEdit->text();
QTextStream out(&file); out.setCodec("UTF-8"); out << lineEdit->text();
QTextStream out(device); out.setCodec("IBM866"); domDocument.save(out, IndentSize);