tier1/kcodecs, deprecate KEncodingDetector, favor KEncodingProber

Kevin Ottens ervin at kde.org
Fri Jun 29 14:15:07 UTC 2012


Hello,

First of all, thanks a lot for volunteering, it's highly appreciated!

On Tuesday 26 June 2012 13:25:28 nihui wrote:
> [...]
> KEncodingDetector seems to come from khtml, it has some capability to deal
> with html/xml and http header and some khtml-like codes. KEncodingProber is
> more generic and clean without any khtml and xml parsing codes.
> KEncodingDetector is not fully implemented, it only handles Arabic, Baltic,
> CentralEuropean, Cyrillic, Greek, Hebrew, Japanese, Turkish and
> WesternEuropean, while KEncodingProber is more powerfull with addition
> capability on ChineseSimplified, ChineseTraditional, Korean and Univeral
> detecting mode, etc. http://lxr.kde.org/ident?i=KEncodingDetector says that
> KEncodingDetector is mostly used in khtml, simon import codes and
> kdeui/actions/kcodecaction.cpp for setting encoding menu. porting to
> KEncodingProber should be easy in the later two cases since they only use
> the encoding detection functions. So it shall make sence to move
> KEncodingDetector class back into khtml, reduce class duplication in
> kcodecs.

Seems to mostly make sense, there's just one potential catch that should be 
investigated. khtml uses KCodecAction, which in turns will use the codec list 
of KEncodingProber (once you'll have moved KEncodingDetector out of kcodecs).

So there's a risk of khtml using a different codec list than KCodecAction and 
we'd end up in trouble. Before starting could you check where the codec lists 
are coming for KEncodingDetector and KEncodingProber, and if they are of 
different sources they should be merged first before moving the class back to 
khtml.

Regards.
-- 
Kévin Ottens, http://ervin.ipsquad.net

KDAB - proud patron of KDE, http://www.kdab.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20120629/26309115/attachment.sig>


More information about the Kde-frameworks-devel mailing list