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>
(cherry picked from commit 50860c0fde)
r14.1.x
Michele Calgaro 12 months ago
parent 5e65678a12
commit 180f871b5f
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