Version: (using KDE KDE 3.5.5) Installed from: Compiled From Sources Compiler: gcc (GCC) 4.0.3 OS: Linux I added some labels to a sketch and two of them contain the greek alpha symbol α. But after opening the file the next day, alpha is replaced by some other chars (capital i with circumflex and +/-). If I remove the first (magic) line, file confirms the kig file is "UTF-8 Unicode text". Opening it shows the same two bad symbols: <Data type="string" id="2" >α</Data> <Data type="string" id="16" >2α</Data> So I deduce that something is wrong before writing the file already. The fact that two chars replaced one maybe shows that kig interprets the multibyte unicode char as two singlebyte chars (both those chars are ascii).
Created attachment 18105 [details] screenshot
it's not that simple: α 03B1 -------- Î 00CE ± 00B1
SVN commit 607078 by pino: Do not silently convert to an encoding different than UTF-8 when saving. BUGS: 135564 M +1 -1 native-filter.cc --- branches/KDE/3.5/kdeedu/kig/filters/native-filter.cc #607077:607078 @@ -665,7 +665,7 @@ docelem.appendChild( windowelem ); doc.appendChild( docelem ); - stream << doc.toCString(); + stream << doc.toString(); return true; }
SVN commit 607079 by pino: Do not silently convert to an encoding different than UTF-8 when saving. CCBUG: 135564 M +1 -1 native-filter.cc --- branches/kig/post-kde-3.5/kig/filters/native-filter.cc #607078:607079 @@ -719,7 +719,7 @@ docelem.appendChild( windowelem ); doc.appendChild( docelem ); - stream << doc.toCString(); + stream << doc.toString(); return true; }
SVN commit 607080 by pino: Do not silently convert to an encoding different than UTF-8 when saving. CCBUG: 135564 M +1 -1 native-filter.cc --- trunk/KDE/kdeedu/kig/filters/native-filter.cc #607079:607080 @@ -722,7 +722,7 @@ docelem.appendChild( windowelem ); doc.appendChild( docelem ); - stream << doc.toByteArray(); + stream << doc.toString(); return true; }