QString s1("Русский");QByteArray ba;QDataStream out_stream( &ba,QIODevice::WriteOnly );out_stream << s1;s1.clear();QDataStream in_stream( &ba,QIODevice::ReadOnly );in_stream >> s1;
QString s1("Русский");QByteArray ba = decoder->fromUnicode( s1 );...s1.clear();s1 = decoder->toUnicode( ba );
C++ (Qt)QString s( trUtf8( "Лед" ) );QString s = QString::fromUtf8( "Лед" );QString s = QTextCodec::codecForName( "UTF-8" )->toUnicode( "Лед" );
C++ (Qt)QByteArray data = file.readAll();QString text = QTextCodec::codecForName( "UTF-8" )->toUnicode( data );label->setText( text ); // В text находится строка "Лед" в Unicode.