Fix pasting UTF8 text from clipboard.

This commit is based on work from Roman Savochenko <roman@home.home> available at PR #13, but adapted to the TDE standard. It replaces the aforementioned PR #13.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/14/head
Michele Calgaro 6 months ago
parent f186fb6efb
commit 50860c0fde
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -241,7 +241,8 @@ void SourceData::setData( const TQString& data )
}
FileAccess f( m_tempInputFileName );
bool bSuccess = f.writeFile( TQTextCodec::codecForName("UTF-8")->fromUnicode(data), data.length() );
TQCString cData = TQTextCodec::codecForName("UTF-8")->fromUnicode(data);
bool bSuccess = f.writeFile( cData, cData.length() );
if ( !bSuccess )
{
KMessageBox::error( m_pOptionDialog, i18n("Writing clipboard data to temp file failed.") );

Loading…
Cancel
Save