Bug 337759

Summary: Support vcard 4 - RFC 6350
Product: [Applications] kaddressbook Reporter: Samir Nassar <samir>
Component: generalAssignee: kdepim bugs <pim-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: bberberov+kde, bernhard+kde, cewcbd1szhl, ict, kde-bugzilla, montel, psychonaut, tokoe
Priority: NOR    
Version First Reported In: 5.23.3   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: vCard 4.0 conformant VCF file

Description Samir Nassar 2014-07-24 07:47:35 UTC
There are incompatibilities between kaddressbook and ownCloud 7's vcard. ownCloud 7 exports vcard 3 with support for the IMPP field, kaddressbook doesn't.

Consistency would be achieved if kaddressbook would support import and export of vcard 4 RFC 6350: http://tools.ietf.org/html/rfc6350

I posted a bug with ownCloud at: https://github.com/owncloud/contacts/issues/553
Comment 1 Laurent Montel 2014-07-24 11:58:55 UTC
In 4.14 we have vcard4.0 support.
Not sure that it support IMPP
I need to look at.
Comment 2 Laurent Montel 2014-07-24 12:00:05 UTC
I already need a program which generate vcard4.0 to compare it.
Do you know a program which does it ?
Comment 3 Samir Nassar 2014-07-24 12:07:34 UTC
I don't know of a program myself, but I'm happy to create a vcard file that has all the items of RFC 6350 if that helps.
Comment 4 Laurent Montel 2014-07-24 12:30:37 UTC
We need to have a program which create a vcard.
By hand we can create error etc.
Comment 5 Samir Nassar 2014-07-24 12:52:49 UTC
There is this PHP library: http://sabre.io/vobject/ which has RFC 6350 conformance.
Comment 6 Samir Nassar 2014-07-24 14:10:05 UTC
Created attachment 87933 [details]
vCard 4.0 conformant VCF file

This VCF file is RFC 6350 conformant according to vobject. http://sabre.io/vobject
Comment 7 Laurent Montel 2014-07-24 16:15:51 UTC
Thanks.
I will improve it and test vcard4 support in kaddressbook.
Comment 8 Laurent Montel 2015-01-30 07:29:32 UTC
Just to add info about progress:
I added :
- KIND
- GENDER
- GEO (vcard4.0 format)
- LANG
- ANNIVERSARY
- IMPP (in progress)

I continue my vcard4.0 improvment.
Comment 9 Laurent Montel 2015-02-06 07:40:58 UTC
I added Member too.
Comment 10 Laurent Montel 2015-07-06 19:36:16 UTC
Just for info:
Impp support works now.
I fixed CalendarUrl too
Comment 11 Laurent Montel 2016-05-12 05:52:38 UTC
just for info
Impp is supporting but not used by default for the moment.
Comment 12 Laurent Montel 2016-07-11 06:09:49 UTC
For info I fixed support for "LABEL" in address in vcard4

I continue. I hope a days that it will free bugs :)
Comment 13 Tristan Miller 2017-02-05 15:01:52 UTC
Is this a tracking bug for all vCard 4.0 incompatibilities?  That is, should I report further incompatibilities as comments to this issue, or should I file them as separate bugs and ask that they be linked to this one?  (My account here doesn't seem to allow me to set the Depends on/Blocks fields.)
Comment 14 Boian Berberov 2017-07-19 09:25:10 UTC
When exporting vCards in the 4.0 format, images are exported in the 3.0 format.

Actual results:
PHOTO;ENCODING=b;TYPE=JPEG:[base64-data]
  or
LOGO;ENCODING=b;TYPE=jpeg:[base64-data]

Expected results:
PHOTO:data:image/jpeg;base64,[base64-data]
  or
LOGO:data:image/jpeg;base64,[base64-data]

This could be affecting "KEY" as well, but I don't have it set up.

OS: OpenSUSE Tumbleweed
Version: KAddressBook 5.5.2

Do you want a separate bug for this?

If you would point me to where in the code this could be, I can try to figure out how to fix this.  Thanks.
Comment 15 Boian Berberov 2017-07-19 09:27:04 UTC
*** This bug has been confirmed by popular vote. ***
Comment 16 Störm Poorun 2019-05-13 10:39:26 UTC
(In reply to Boian Berberov from comment #14)
> When exporting vCards in the 4.0 format, images are exported in the 3.0
> format.
> 
> Actual results:
> PHOTO;ENCODING=b;TYPE=JPEG:[base64-data]
>   or
> LOGO;ENCODING=b;TYPE=jpeg:[base64-data]
> 
> Expected results:
> PHOTO:data:image/jpeg;base64,[base64-data]
>   or
> LOGO:data:image/jpeg;base64,[base64-data]
> 
> This could be affecting "KEY" as well, but I don't have it set up.
> 
> OS: OpenSUSE Tumbleweed
> Version: KAddressBook 5.5.2
> 
> Do you want a separate bug for this?
> 
> If you would point me to where in the code this could be, I can try to
> figure out how to fix this.  Thanks.

Did anything further happen on that?
Comment 17 sourcemaker 2023-08-15 13:20:41 UTC
The export/import from vCards in format 4.0 is still broken.

Are there any plans to expand the user interface? 
Many properties cannot be maintained.
Comment 18 cewcbd1szhl 2025-10-15 12:01:45 UTC
Greetings!

It has been more than 8 years since Boian Berberov reported that when exporting vCards in the 4.0 format, images are exported in the 3.0 format resulting in not importing the images to other applications (e. g. on ones mobile phone). Additionally, when importing a vCard in the 4.0 format with an image in the correct vCard 4.0 standard (PHOTO:data:image/jpeg;base64,[base64-data] or LOGO:data:image/jpeg;base64,[base64-data]) KAddressBook ignores the image.

To the Assignee and/or other responsible life forms: Is there any hope of getting this done soon (as in 2025/2026)?
Comment 19 Laurent Montel 2025-10-15 15:23:41 UTC
(In reply to cewcbd1szhl from comment #18)
> Greetings!
> 
> It has been more than 8 years since Boian Berberov reported that when
> exporting vCards in the 4.0 format, images are exported in the 3.0 format
> resulting in not importing the images to other applications (e. g. on ones
> mobile phone). Additionally, when importing a vCard in the 4.0 format with
> an image in the correct vCard 4.0 standard
> (PHOTO:data:image/jpeg;base64,[base64-data] or
> LOGO:data:image/jpeg;base64,[base64-data]) KAddressBook ignores the image.
> 
> To the Assignee and/or other responsible life forms: Is there any hope of
> getting this done soon (as in 2025/2026)?

Do you have a example ?
in attachment we don't have photo or logo into.
Thanks
Comment 20 sourcemaker 2025-10-15 17:02:27 UTC
Can you also support the BDAY attribute as DateTime?
Comment 21 Laurent Montel 2025-10-16 06:22:31 UTC
Git commit 8e25824f924d19f02b83e5c3b929b5d7823ccc56 by Laurent Montel.
Committed on 16/10/2025 at 06:03.
Pushed by mlaurent into branch 'master'.

Add photo vcard4 support

M  +32   -10   src/vcardtool.cpp
M  +2    -0    src/vcardtool_p.h

https://invent.kde.org/frameworks/kcontacts/-/commit/8e25824f924d19f02b83e5c3b929b5d7823ccc56
Comment 22 Laurent Montel 2025-10-16 06:25:52 UTC
(In reply to sourcemaker from comment #20)
> Can you also support the BDAY attribute as DateTime?

I will look at it too.
Comment 23 cewcbd1szhl 2025-10-16 07:02:59 UTC
(In reply to Laurent Montel from comment #19)
> (In reply to cewcbd1szhl from comment #18)
> > Greetings!
> > 
> > It has been more than 8 years since Boian Berberov reported that when
> > exporting vCards in the 4.0 format, images are exported in the 3.0 format
> > resulting in not importing the images to other applications (e. g. on ones
> > mobile phone). Additionally, when importing a vCard in the 4.0 format with
> > an image in the correct vCard 4.0 standard
> > (PHOTO:data:image/jpeg;base64,[base64-data] or
> > LOGO:data:image/jpeg;base64,[base64-data]) KAddressBook ignores the image.
> > 
> > To the Assignee and/or other responsible life forms: Is there any hope of
> > getting this done soon (as in 2025/2026)?
> 
> Do you have a example ?
> in attachment we don't have photo or logo into.
> Thanks

I'm sorry I don't understand your question (I'm not a programmer, just a user).

What I meant is the photo one can attach to a contact and the logo one can attach in KAddressBook to an organisation.

And thanks for your fast response!
Comment 24 cewcbd1szhl 2025-10-16 07:04:48 UTC
(In reply to Laurent Montel from comment #21)
> Git commit 8e25824f924d19f02b83e5c3b929b5d7823ccc56 by Laurent Montel.
> Committed on 16/10/2025 at 06:03.
> Pushed by mlaurent into branch 'master'.
> 
> Add photo vcard4 support
> 
> M  +32   -10   src/vcardtool.cpp
> M  +2    -0    src/vcardtool_p.h
> 
> https://invent.kde.org/frameworks/kcontacts/-/commit/
> 8e25824f924d19f02b83e5c3b929b5d7823ccc56

Does that mean your changes will be provided as an update for KAddressBook in the respective Linux distributions (e. g. Ubuntu)?
Comment 25 Laurent Montel 2025-10-16 07:09:24 UTC
Git commit fd4590e37a3e532c1f2cf8c16d234343d3fb58de by Laurent Montel.
Committed on 16/10/2025 at 06:24.
Pushed by mlaurent into branch 'master'.

Add LOGO vcard4 support

M  +12   -4    src/vcardtool.cpp

https://invent.kde.org/frameworks/kcontacts/-/commit/fd4590e37a3e532c1f2cf8c16d234343d3fb58de
Comment 26 Laurent Montel 2025-10-16 07:09:26 UTC
Git commit 1e55013d8d244a3397af336b5af937c92979d97c by Laurent Montel.
Committed on 16/10/2025 at 07:08.
Pushed by mlaurent into branch 'master'.

Add support for importing image vcard 4

M  +12   -1    src/vcardtool.cpp

https://invent.kde.org/frameworks/kcontacts/-/commit/1e55013d8d244a3397af336b5af937c92979d97c
Comment 27 Laurent Montel 2025-10-16 07:10:20 UTC
(In reply to cewcbd1szhl from comment #24)
> (In reply to Laurent Montel from comment #21)
> > Git commit 8e25824f924d19f02b83e5c3b929b5d7823ccc56 by Laurent Montel.
> > Committed on 16/10/2025 at 06:03.
> > Pushed by mlaurent into branch 'master'.
> > 
> > Add photo vcard4 support
> > 
> > M  +32   -10   src/vcardtool.cpp
> > M  +2    -0    src/vcardtool_p.h
> > 
> > https://invent.kde.org/frameworks/kcontacts/-/commit/
> > 8e25824f924d19f02b83e5c3b929b5d7823ccc56
> 
> Does that mean your changes will be provided as an update for KAddressBook
> in the respective Linux distributions (e. g. Ubuntu)?

it's in frameworks/kcontact
=> this changes will be added when distro will provide framework kf6.20
Comment 28 cewcbd1szhl 2025-10-16 07:19:06 UTC
(In reply to Laurent Montel from comment #27)
> (In reply to cewcbd1szhl from comment #24)
> > (In reply to Laurent Montel from comment #21)
> > > Git commit 8e25824f924d19f02b83e5c3b929b5d7823ccc56 by Laurent Montel.
> > > Committed on 16/10/2025 at 06:03.
> > > Pushed by mlaurent into branch 'master'.
> > > 
> > > Add photo vcard4 support
> > > 
> > > M  +32   -10   src/vcardtool.cpp
> > > M  +2    -0    src/vcardtool_p.h
> > > 
> > > https://invent.kde.org/frameworks/kcontacts/-/commit/
> > > 8e25824f924d19f02b83e5c3b929b5d7823ccc56
> > 
> > Does that mean your changes will be provided as an update for KAddressBook
> > in the respective Linux distributions (e. g. Ubuntu)?
> 
> it's in frameworks/kcontact
> => this changes will be added when distro will provide framework kf6.20

Understood. Thanks again for your super fast reaction!
Comment 29 Laurent Montel 2025-10-16 11:55:47 UTC
Git commit 69a9f5519eecacb606b2a4c92c4dec64ef109386 by Laurent Montel.
Committed on 16/10/2025 at 11:40.
Pushed by mlaurent into branch 'master'.

Fix ANNIVERSARY/BDAY support in vcard 4.0

M  +10   -11   src/vcardparser/vcard.cpp
M  +15   -5    src/vcardtool.cpp

https://invent.kde.org/frameworks/kcontacts/-/commit/69a9f5519eecacb606b2a4c92c4dec64ef109386
Comment 30 Laurent Montel 2025-10-17 06:12:13 UTC
Git commit 03e47f706a90866c3385ed7903fb9a8f93cce5a9 by Laurent Montel.
Committed on 17/10/2025 at 06:12.
Pushed by mlaurent into branch 'master'.

PRepare to support vcard4 timezone

M  +32   -4    src/timezone.cpp
M  +5    -0    src/timezone.h

https://invent.kde.org/frameworks/kcontacts/-/commit/03e47f706a90866c3385ed7903fb9a8f93cce5a9
Comment 31 sourcemaker 2025-10-25 09:47:16 UTC
(In reply to Laurent Montel from comment #29)
> Git commit 69a9f5519eecacb606b2a4c92c4dec64ef109386 by Laurent Montel.
> Committed on 16/10/2025 at 11:40.
> Pushed by mlaurent into branch 'master'.
> 
> Fix ANNIVERSARY/BDAY support in vcard 4.0
> 
> M  +10   -11   src/vcardparser/vcard.cpp
> M  +15   -5    src/vcardtool.cpp
> 
> https://invent.kde.org/frameworks/kcontacts/-/commit/
> 69a9f5519eecacb606b2a4c92c4dec64ef109386

Excellent! Thank you. ;-)
Comment 32 sourcemaker 2025-11-02 17:57:02 UTC
Can you support more vCard 4.0 properties?

BIRTHPLACE
DEATHDATE
DEATHPLACE
TZ
HOBBY
INTEREST
Comment 33 Laurent Montel 2025-11-02 17:59:03 UTC
(In reply to sourcemaker from comment #32)
> Can you support more vCard 4.0 properties?
> 
> BIRTHPLACE
> DEATHDATE
> DEATHPLACE
> TZ
> HOBBY
> INTEREST
it's an extension
https://www.rfc-editor.org/rfc/rfc6474.html#page-2

Which app implements it ?
Comment 34 sourcemaker 2025-11-02 18:58:26 UTC
Since I only use KAddressbook, I can't answer that question. I like KAddressbook ;-)
Comment 35 sourcemaker 2025-11-03 00:03:34 UTC
vCard Format Specification
https://www.rfc-editor.org/rfc/rfc6350.html
- TZ

vCard Format Extensions
https://www.rfc-editor.org/rfc/rfc6715.html
- HOBBY
- INTEREST

vCard Format Extensions
https://www.rfc-editor.org/rfc/rfc6474.html
- BIRTHPLACE
- DEATHDATE
- DEATHPLACE
Comment 36 Laurent Montel 2025-11-03 05:49:58 UTC
(In reply to sourcemaker from comment #35)
> vCard Format Specification
> https://www.rfc-editor.org/rfc/rfc6350.html
> - TZ

TZ is already implemented in kcontacts.
Comment 37 Störm Poorun 2025-11-03 10:38:17 UTC
(In reply to Laurent Montel from comment #33)
> (In reply to sourcemaker from comment #32)
> > Can you support more vCard 4.0 properties?
> > 
> > BIRTHPLACE
> > DEATHDATE
> > DEATHPLACE
> > TZ
> > HOBBY
> > INTEREST
> it's an extension
> https://www.rfc-editor.org/rfc/rfc6474.html#page-2
> 
> Which app implements it ?

These platforms and their apps sorry

Nextcloud (contacts)
eM Client (contacts)
Thunderbird (contacts, using CardDav plugin)
Roundcube Mail (contacts, using RCMcarddav)
Comment 38 Laurent Montel 2025-11-03 12:41:59 UTC
(In reply to Störm Poorun from comment #37)
> (In reply to Laurent Montel from comment #33)
> > (In reply to sourcemaker from comment #32)
> > > Can you support more vCard 4.0 properties?
> > > 
> > > BIRTHPLACE
> > > DEATHDATE
> > > DEATHPLACE
> > > TZ
> > > HOBBY
> > > INTEREST
> > it's an extension
> > https://www.rfc-editor.org/rfc/rfc6474.html#page-2
> > 
> > Which app implements it ?
> 
> These platforms and their apps sorry
> 
> Nextcloud (contacts)
> eM Client (contacts)
> Thunderbird (contacts, using CardDav plugin)
> Roundcube Mail (contacts, using RCMcarddav)

Hi,
ok thanks for info.
=> I need to adapt kcontact 
+ adding support in kaddressbook.
Comment 39 Laurent Montel 2025-11-05 12:40:49 UTC
Git commit c7c361176cee58ae0f46395dc171991ec2542d64 by Laurent Montel.
Committed on 05/11/2025 at 12:26.
Pushed by mlaurent into branch 'master'.

Add DeathDate vcard4 support

M  +3    -0    autotests/addresseetest.cpp
M  +24   -0    src/addressee.cpp
M  +17   -0    src/addressee.h

https://invent.kde.org/frameworks/kcontacts/-/commit/c7c361176cee58ae0f46395dc171991ec2542d64
Comment 40 Nicolas Fella 2025-11-07 17:25:13 UTC
Git commit c95cfbed2e4242937396a7b83ac67858e93ffadc by Nicolas Fella.
Committed on 07/11/2025 at 17:24.
Pushed by nicolasfella into branch 'master'.

Revert "PRepare to support vcard4 timezone"

This is missing documentation and was pushed without review

This reverts commit 03e47f706a90866c3385ed7903fb9a8f93cce5a9.
CCMAIL: montel@kde.org

M  +4    -32   src/timezone.cpp
M  +0    -5    src/timezone.h

https://invent.kde.org/frameworks/kcontacts/-/commit/c95cfbed2e4242937396a7b83ac67858e93ffadc
Comment 41 Laurent Montel 2025-11-07 17:28:28 UTC
Just for info it's nicolas Fella who will implement it now !
Please report to him as it seems that revert commit!

Too bad I had other commit for finishing to implement vcard4 but now Nicolas will do it or not (I am sure that it will be "not")

Sorry guy !