[kde-freebsd] kchmviewer-3 patch

张俊 xtaywcwt at tom.com
Thu Mar 17 16:01:43 CET 2011


The default code for read the file is changed to UTF-8

files/patch-lib__libchmfile__libchmfileimpl.cpp

code:

--- ./lib/libchmfile/libchmfileimpl.cpp.orig    2007-06-17
10:41:33.000000000 +0800
+++ ./lib/libchmfile/libchmfileimpl.cpp 2011-03-17 22:28:56.000000000
+0800
@@ -1177,9 +1177,10 @@
        if ( !m_detectedLCID || (enc = lookupByLCID (m_detectedLCID)) ==
0 )
                qFatal ("Could not detect text encoding by LCID");
        
-       if ( changeFileEncoding (enc->qtcodec) )
+       enc=getTextEncodingTable();
+       if ( changeFileEncoding ((enc+126)->qtcodec) )
        {
-               m_currentEncoding = enc;
+               m_currentEncoding = enc+126;
                return true;
        }
			 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-freebsd/attachments/20110317/9f284408/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kchmviewer.tar.gz
Type: application/x-gzip
Size: 2130 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-freebsd/attachments/20110317/9f284408/attachment.gz 


More information about the kde-freebsd mailing list