[Kde-pim] [patch] vcard parsing in KDE3.5

Kevin Krammer kevin.krammer at gmx.at
Sun Jan 6 17:57:29 GMT 2008


On Sunday 06 January 2008, Tobias Koenig wrote:
> On Sat, Jan 05, 2008 at 01:52:16PM +0100, Martin Koller wrote:
> > Hi all,
>
> Hej Martin,
>
> > attached is a patch that corrects the vcard parsing bug (kdelibs/kabc)
> > dealing with different charsets in vcards.
> > It solves e.g. https://bugs.kde.org/show_bug.cgi?id=98790
> > This is mainly a backport from KDE4 where it's already solved.
>
> Well, in KDE4 the input for the vCard parser is a QByteArray, in other
> words plain data without previous convertion. In KDE3 the vCard parser
> expects a QString, so you always need at least one convertion from the
> raw data (QCString) to QString. From your patch it looks like to always
> use latin1. Are you sure that doesn't remove any information from the
> input data?
>
> The right fix would be to use QCString as input data for vCard parser,
> however that's not possible because it's SIC/BIC. (I know, bad design
> in 3.x cycle...)

Since the methods in VCardParser are not virtual but static, it should be BC 
to add another set of static methods which take QByteArray or QCString as 
their argument and implement them properly.

Any code under our control (e.g. thumbnailer, KAddressBook) can then be ported 
to this new methods, thus fixing the bug, while the two older methods keep 
their current functionality, thus keeping any programs which use them 
unchanged as well.

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20080106/5360f81d/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list