From kde-pim Sun Jan 06 17:57:29 2008 From: Kevin Krammer Date: Sun, 06 Jan 2008 17:57:29 +0000 To: kde-pim Subject: Re: [Kde-pim] [patch] vcard parsing in KDE3.5 Message-Id: <200801061857.42573.kevin.krammer () gmx ! at> X-MARC-Message: https://marc.info/?l=kde-pim&m=119964233101017 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============1004667412==" --===============1004667412== Content-Type: multipart/signed; boundary="nextPart4841871.RmupX6RTnk"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart4841871.RmupX6RTnk Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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=3D98790 > > 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 B= C=20 to add another set of static methods which take QByteArray or QCString as=20 their argument and implement them properly. Any code under our control (e.g. thumbnailer, KAddressBook) can then be por= ted=20 to this new methods, thus fixing the bug, while the two older methods keep= =20 their current functionality, thus keeping any programs which use them=20 unchanged as well. Cheers, Kevin =2D-=20 Kevin Krammer, KDE developer, xdg-utils developer KDE user support, developer mentoring --nextPart4841871.RmupX6RTnk Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBHgRaWnKMhG6pzZJIRAs0+AKCGp2pJIuNzlsJY1xhqpxEno063pgCfRjHm g6NfFQY3wbeIs5Qz32Xe5IY= =PYp3 -----END PGP SIGNATURE----- --nextPart4841871.RmupX6RTnk-- --===============1004667412== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ KDE PIM mailing list kde-pim@kde.org https://mail.kde.org/mailman/listinfo/kde-pim KDE PIM home page at http://pim.kde.org/ --===============1004667412==--