Bug 64900

Summary: Non-latin1 text breaks on copying
Product: [Applications] calligraflow Reporter: Andrey Cherepanov <sibskull>
Component: generalAssignee: Peter Simonsson <peter.simonsson>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

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();
 }