[Bug 74000] New: kchmpart can't display CJK index in chm file

leo zhu lucida at lucida.et8.net
Mon Feb 2 11:43:08 UTC 2004


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
      
http://bugs.kde.org/show_bug.cgi?id=74000      
           Summary: kchmpart can't display CJK index in chm file
           Product: kdevelop
           Version: unspecified
          Platform: Compiled Sources
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: kdevelop-devel at kdevelop.org
        ReportedBy: lucida at lucida.et8.net


Version:           kdevelop 3.0.0 (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc 3.3.1 
OS:          Linux

The kchmpart component, which can be intergrated in konqueror to view chm files, has some problem in display index in CJK chars.

The problem is, during the info. extracting, the chars has been encoded as latin1, and a CString::local8Bit() would mess up all these. We should just leave the contents untouched and let konqueror to handle the encoding. Here is the patch


--- kdevelop.old/parts/doctreeview/chm/chm.cpp  2003-04-13 13:52:23.000000000 -0700
+++ kdevelop/parts/doctreeview/chm/chm.cpp      2004-02-01 17:07:31.731921104 -0800
@@ -135,8 +136,9 @@
         //KMimeMagicResult * result = KMimeMagic::self()->findBufferFileType( output, path );
         //kdDebug() << "Emitting mimetype " << result->mimeType() << endl;
         //mimeType( result->mimeType() );
-        data(output.local8Bit());
-        processedSize(output.length());
+        QCString output1 = (QCString)(output.latin1());
+        data(output1);
+       processedSize(output1.length());
     } else {
         int offset = m_dirMap[path].offset;
         int length = m_dirMap[path].length;




More information about the KDevelop-devel mailing list