Version: 3.1 (using KDE 3.1.94 (3.2 Beta 2), compiled sources) Compiler: gcc version 3.3.1 (SuSE Linux) OS: Linux (i686) release 2.4.21-166-athlon When I export my contacts from Ximian Evolution to a .vcf File, I get for example the following entry: BEGIN:VCARD VERSION:2.1 X-EVOLUTION-FILE-AS;CHARSET=UTF-8;QUOTED-PRINTABLE:H=C3=B6ssinger, Andreas FN;CHARSET=UTF-8;QUOTED-PRINTABLE:Andreas H=C3=B6ssinger N;CHARSET=UTF-8:Hössinger;Andreas EMAIL;INTERNET:hoessinger@irgendeineadressediesnichtgibt.at X-EVOLUTION-LAST-USE:2003-12-17 X-EVOLUTION-USE-SCORE:16.171589 CATEGORIES:IuE UID:pas-id-3EF2D04D00000003 END:VCARD When I import it in KAddressbook the name of the person is displayed korrectly in the contact list (with an umlaut o) and in the summary his name is displayed as: Andreas H=C3=B6ssinger LG, Burt
Subject: kdelibs/kabc/vcardparser CVS commit by tokoe: Fixed the handling of vCard 2.1 with quoted-printable and charset=utf-8. That fixes #72380. CCMAIL:72380-done@bugs.kde.org M +14 -1 vcardparser.cpp 1.12 --- kdelibs/kabc/vcardparser/vcardparser.cpp #1.11:1.12 @@ -73,6 +73,12 @@ VCard::List VCardParser::parseVCards( co QStringList pair = QStringList::split( '=', params[i] ); if ( pair.size() == 1 ) { + // correct the fucking 2.1 'standard' + if ( pair[0].lower() == "quoted-printable" ) { + pair[0] = "encoding"; + pair[1] = "quoted-printable"; + } else { pair.prepend( "type" ); } + } //This is pretty much a faster pair[1].contains( ',' )... if ( pair[1].find( ',' ) != -1 ) { // parameter in type=x,y,z format @@ -93,5 +99,12 @@ VCard::List VCardParser::parseVCards( co else if ( vCardLine.parameter( "encoding" ).lower() == "quoted-printable" ) KCodecs::quotedPrintableDecode( input, output ); - vCardLine.setValue( output ); + + if ( vCardLine.parameter( "charset" ).lower() == "utf-8" ) { + vCardLine.setValue( QString::fromUtf8( output.data(), output.size() ) ); + } else { + vCardLine.setValue( QString::fromAscii( output.data(), output.size() ) ); + } + } else if ( vCardLine.parameter( "charset" ).lower() == "utf-8" ) { + vCardLine.setValue( QString::fromUtf8( value.ascii() ) ); } else vCardLine.setValue( value.replace( "\\n", "\n" ) );
The problem still persists. I attached a .vcf file for testing.
Created attachment 4912 [details] Problematic .vcf file, generated by Ximian Evolution
Created attachment 4913 [details] Zipped version of a problematic .vcf file including utf8 and quoted printable exported with ximian evoltuion
On Fri, Feb 27, 2004 at 10:54:16AM -0000, Robert Entner wrote: Hi Robert, > ------- Additional Comments From kde mail1 entner net 2004-02-27 11:54 ------- > Created an attachment (id=4913) > --> (http://bugs.kde.org/attachment.cgi?id=4913&action=view) > Zipped version of a problematic .vcf file including utf8 and quoted printable > exported with ximian evoltuion I can import this vCard without problem with KAddressBook/kdelibs from CVS HEAD. It's really fixed. Ciao, Tobias
I tried the attached vcard in comment #4, and it imported correctly when using the default resource, but if I import to my imap resource (through kmail), the non-ascii characters are garbled (by two boxes). Any hints on how to fix this would be greatly appreciated as a majority of my contacts have non-ascii characters. kdepim-3.5.9-10.fc9.i386 Kontact: 1.2.9 KAddressBook: 3.5.9 KMail: 1.9.9
The development of the old KAddressBook will be discontinued for KDE 4.4. Since the new application has the same name, but a completly new code base we close all bug reports against the old version and ask the submitters to resend there reports against the new product.