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

Tobias Koenig tokoe at kde.org
Sun Jan 6 21:23:59 GMT 2008


On Sun, Jan 06, 2008 at 09:34:42PM +0100, Martin Koller wrote:
> Hello,
Hej Martin,

> But as the input is an unconverted string (at least after I changed some 
> QTextString::setEncoding from UTF8 to Latin1), this must be the case.
> (And if it's not, the vcardparser would not work anyway, as a probably given 
> CHARSET could not be handled)
Ok, right.

> So the only problematic step might be this:
> -          vCardLine.setValue( value );
> +        } else {  // if charset not given, assume it's in UTF-8 (as used in 
> previous KDE versions)
> +            vCardLine.setValue( QString::fromUtf8( output ) );
> 
> and if you really see this as needed, I could add the following workaround:
> Convert given QString to latin1(), convert back to QString, check if still 
> equal with given string. If so, use "fromUtf8", else use given string.
Sounds like a performance bottleneck to me... let's omit it and wait
until somebody complains ;)

Ok, so the patch is fine, please commit.

Ciao,
Tobias
-- 
Separate politics from religion and economy!
The Council of the European Union is an undemocratic and illegal institution!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20080106/a5e243d4/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