summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2023-11-26 21:20:45 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2023-11-27 00:05:55 +0900
commit50860c0fdea9a18e69c44c3dc083b6398cc5be7c (patch)
tree3ff55017953693881cdd361cf84fd423cec4a353
parentf186fb6efbd13c6797e1c25a4cf4dc8bbcf66aa6 (diff)
downloadkdiff3-50860c0f.tar.gz
kdiff3-50860c0f.zip
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>
-rw-r--r--src/diff.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/diff.cpp b/src/diff.cpp
index 2bf58eb..fba2c1a 100644
--- a/src/diff.cpp
+++ b/src/diff.cpp
@@ -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.") );