diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-11-26 21:20:45 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-11-27 00:23:51 +0900 |
commit | 180f871b5f18eebce1fda096c9148ad773f81a40 (patch) | |
tree | 36f4a6809b0997846b8f5f914ccd32d6d2abe2e6 /src/diff.cpp | |
parent | 5e65678a12cde153a322cc7df93a3bcd0291b68a (diff) | |
download | kdiff3-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.cpp | 3 |
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.") ); |