Hi, some comments about encoding detection (KEncodingDetector)

wang kai fearee at gmail.com
Wed Jul 23 07:32:11 BST 2008

i attach a big patch
1.port mozilla's  detection code
2.ChinseSimplified/Tradition encoding detection for KEncodingDetector:
   automaticDetectForChinese()  can detect gb18030/big5/utf8 encoding

patch is too long to include in the mail (size: 529k)
get it from

2008/7/23, wang kai <fearee at gmail.com>:
> Forgot to mention that: it's also compatible with LGPL v2 or later.
> see
> http://mxr.mozilla.org/seamonkey/source/extensions/universalchardet/src/base/nsUniversalDetector.h
> line 26,
> it also says that we can delete some license's provisions to remove
> its triple(MPL/GPL/LGPL) license and become a clean LGPL license.
> its faq:
> http://www.mozilla.org/MPL/relicensing-faq.html
> 2008/7/23, Alex Merry <huntedhacker at tiscali.co.uk>:
>> On Tuesday 22 July 2008 11:11:09 wang kai wrote:
>>> Firefox has a great Universal Charset Detection with a mix of above 3
>>> methods. I've tested another charset/encoding detector: python-chardet,
>>> it's worse, Firefox' is the best  detector by far, Java already port it.
>>> and its License(MPL) is a triple license now  and compatible with GPL. i
>>> suggest you use it, not to re-invent the wheel.
>>> if you guys wish to accept such things, i can continue porting it to
>>> kde4's trunk version. And also if you're not comfortable with the
>>> license, i can even rewrite one from scratch.
>> I can't really comment on the code, although I guess better encoding
>> detection
>> would be welcome, but code for kdelibs needs to be LGPL compatible, not
>> just
>> GPL compatible.
>> Alex
>> --
>> KDE: http://www.kde.org
>> Ubuntu/Kubuntu: http://www.ubuntu.org http://www.kubuntu.org

More information about the kde-core-devel mailing list