KCodecs - Quick Review

David Faure faure at kde.org
Fri Mar 28 14:37:16 UTC 2014


On Tuesday 04 March 2014 16:58:11 John Layt wrote:
> Hi,
> 
> I know nothing about text codecs, but I've had a *very* quick look at
> KCodecs:
> 
> * Original code by Lars dated 1999!

So? :-)

> * One method marked as deprecated to be removed for KDE4
> * "###FIXME KDE4: the name of the encodings should mostly be uppercase"

Fixed meanwhile.

> * Code generated by script generate_string_table.pl located in
> kdesdk/scripts * Algorithms marked as copyright by RSA Data Security and
> others, but no mention what the original licence was or real link to
> original source * Encoding probers and lookup tables marked as copyright
> Mozilla 1998, X11 license
> * kentities.c is documented as generated by gperf from either
> kentities.gperf and/or khtmlentities.gperf but neither are in kcodecs,
> instead they are in khtml as is another copy of kentities.c.
> * Public API using boolean parms
> 
> This suggests it could do with some attention:
> * Check still valid to remove deprecated code?
> * The generate_string_table.pl script should probably be moved into KCodecs,
> unless it has more general use?

It's used in other places too (e.g. kstandarddirs).

> * The RSA and other algorithms may need checking for licensing issues, or at
> least improve the license documentation?
> * The probers may need to be checked they are still up to date with the
> original Mozilla code and look-up tables?
> * kentities.c needs investigation and I suspect moving all the files from
> khtml to kcodecs, with khtml then using kcodecs? 

That would require making some public API out of that file, which sounds not 
fun since it's a generated file.

> Or at least docs added
> that this is where it comes from and should be kept in sync.

Yes.

> I wonder how much of this functionality is now done in Qt5?

I'm not aware of a replacement for KCharsets::fromEntity() in Qt.
I.e. some code that can turn ñ into '~'.

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5



More information about the Kde-frameworks-devel mailing list