Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Mar 2011 22:54:25 +0800
From:      zhangjun <xtaywcwt@tom.com>
To:        freebsd-ports@freebsd.org
Subject:   [Fwd: kchmviewer-3 patch]
Message-ID:  <1300373665.22111.6.camel@zj>

next in thread | raw e-mail | index | archive | help

--=-9gjacGf9x048VLbEWzCS
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit

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

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

--=-9gjacGf9x048VLbEWzCS--





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1300373665.22111.6.camel>