Bug 64900 - Non-latin1 text breaks on copying
Summary: Non-latin1 text breaks on copying
Status: RESOLVED FIXED
Alias: None
Product: calligraflow
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Peter Simonsson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-25 07:47 UTC by Andrey Cherepanov
Modified: 2003-09-26 20:07 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Cherepanov 2003-09-25 07:47:52 UTC
Version:           1.2.92 (using KDE 3.1.2)
Installed from:    compiled sources
Compiler:          gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98)
OS:          Linux (i686) release 2.4.7-10

When I copy text on Russian on paste I get only ??? instead Russian letters. English letter after pasting show correct.
Comment 1 Peter Simonsson 2003-09-26 20:07:55 UTC
Subject: koffice/kivio/kiviopart

CVS commit by psn: 

Fix copying with other encodings then latin1

CCMAIL: 64900-close@bugs.kde.org


  M +2 -5      kiviodragobject.cpp   1.7


--- koffice/kivio/kiviopart/kiviodragobject.cpp  #1.6:1.7
@@ -142,4 +142,5 @@ QByteArray KivioDragObject::kivioEncoded
   QDomDocument doc("KivioSelection");
   QDomElement elem = doc.createElement( "KivioSelection" );
+  doc.appendChild(elem);
   KivioStencil *stencil = 0;
   QPtrListIterator<KivioStencil> it(m_stencilList);
@@ -150,9 +151,5 @@ QByteArray KivioDragObject::kivioEncoded
   }
 
-  QCString result;
-  QTextStream ts(result, IO_WriteOnly);
-  ts << elem;
-
-  return result;
+  return doc.toCString();
 }