KDiff3: Fixes pasting UTF8 from clipboard

Signed-off-by: Roman Savochenko <roman@home.home>
pull/13/head
Roman Savochenko 2 years ago
parent f186fb6efb
commit dfd1d3d853

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

Loading…
Cancel
Save