summaryrefslogtreecommitdiffstats
path: root/src/diff.cpp
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:23:51 +0900
commit180f871b5f18eebce1fda096c9148ad773f81a40 (patch)
tree36f4a6809b0997846b8f5f914ccd32d6d2abe2e6 /src/diff.cpp
parent5e65678a12cde153a322cc7df93a3bcd0291b68a (diff)
downloadkdiff3-180f871b5f18eebce1fda096c9148ad773f81a40.tar.gz
kdiff3-180f871b5f18eebce1fda096c9148ad773f81a40.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> (cherry picked from commit 50860c0fdea9a18e69c44c3dc083b6398cc5be7c)
Diffstat (limited to 'src/diff.cpp')
-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.") );