https://bugs.kde.org/show_bug.cgi?id=293098

--- Comment #8 from Ingo Ratsdorf <i...@envirology.co.nz> ---
vcardtool assumes that categories are stored in a QStringList:

creating VCard data

142        if ( version == VCard::v3_0 ) {
143          QStringList categories = (*addrIt).categories();
144          QStringList::Iterator catIt;
145          for ( catIt = categories.begin(); catIt != categories.end();
++catIt ) {
146            (*catIt).replace( QLatin1Char( ',' ), QLatin1String( "\\," ) );
147          }
148    
149          VCardLine catLine( QLatin1String( "CATEGORIES" ), categories.join(
QLatin1String( "," ) ) );
150          card.addLine( catLine );
151        }

The code seems to be okay. It replaces all commas within each string (category)
with '\,' which is correct.
It then joins it all together using plain ','.
This is according to RFC

parsing VCard Data

364      static const QLatin1Char commaSep( ',' );

428            else if ( identifier == QLatin1String( "categories" ) ) {
429              const QStringList categories = splitString( commaSep,
(*lineIt).value().toString() );
430              addr.setCategories( categories );
431            }

Addr is apparently defined in kabc/addressee.cpp, however I cannot find that
file!!!

=====================

ASSUMPTION: KAddressbook or underlaying packages are not using QStringlist but
store one single CATEGORIES string in QStringlist,
hence all commas within are replaced.

Does that make sense to anyone?

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Kdepim-bugs mailing list
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs

Reply via email to