QByteArray ba = S.toLocal8Bit();char* s = ba.data();
QTextCodec c = QTextCodec::codecForName( "Windows-1251" );QByteArray ba = c->fromUnicode( S );char* s = ba.data();
QByteArray ba = S.toUtf8();char* s = ba.data();