Bug 74000 - kchmpart can't display CJK index in chm file
Summary: kchmpart can't display CJK index in chm file
Status: RESOLVED DUPLICATE of bug 80083
Alias: None
Product: kdevelop
Classification: Applications
Component: doctreeview (show other bugs)
Version: 3.0.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KDevelop Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-02 11:41 UTC by leo zhu
Modified: 2004-05-08 00:23 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description leo zhu 2004-02-02 11:41:59 UTC
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;
Comment 1 Funda Wang 2004-03-25 17:03:00 UTC
This patch works for me. So, please accept it.
Comment 2 Leonid Zeitlin 2004-05-06 21:33:30 UTC
The same patch fixes problems with Russian-language CHM files. 
Please accept it.

Comment 3 Hackeron 2004-05-06 21:54:39 UTC
Yes, I also need this patch, please accept it.
Comment 4 Alexander Dymo 2004-05-08 00:11:15 UTC
Thanks for the patch. Applied in HEAD in new documentation plugin.
Comment 5 leo zhu 2004-05-08 00:17:11 UTC
Hi all! please also looking at this:
http://bugs.kde.org/show_bug.cgi?id=80083

It's a newer and better version for this problem.

Comment 6 Alexander Dymo 2004-05-08 00:23:02 UTC

*** This bug has been marked as a duplicate of 80083 ***