Bug 82063 - vcard export does not define character set or encoding
Summary: vcard export does not define character set or encoding
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kab3
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Tobias Koenig
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-23 16:35 UTC by ubq7
Modified: 2009-08-05 16:09 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ubq7 2004-05-23 16:35:13 UTC
Version:            (using KDE KDE 3.2.2)
Installed from:    Debian testing/unstable Packages

Hi,

exporting my contacts as vCard 2.1 actually produces an invalid file according to the specs. Without mentioning the encoding, 7bit encoding is allowed, else the property "ENCODING=8BIT" should be set (see chapter 2.1.5 of vCard-2.1 spec from IMC).
Additionally (and much worse), you use UTF-8 in the file (e.g. for the fields ADR, N and FN) but do not declare the used character set :-(
This means that the used character set is ASCII. To use UTF-8, you MUST use property CHARSET (see chapter 2.1.6 of vCard-2.1 spec from IMC).

Please fix this, specification compliance is important.

Additionally, fields like
UID:1lmKDOVz9
X-KPILOT-RecordID:954403
should be optionally left out.
However, I really suggest a REV (revision with date) field as this makes it easier on syncing with other address sources.

After reading page 36 of rfc2426, the charset and encoding bug does not apply to vCard 3.0. However, I really question the usability of a file where character set and encoding are absent :-/
From rfc2426:
"The [VCARD] CHARSET type parameter has been eliminated.
 Character set can only be specified on the CHARSET parameter
 on the Content-Type MIME header field."
With a single file, you DO NOT HAVE such a header field.
With that in mind, I suggest a proper warning to the user or even finding a solution. I did not read the whole RFC but maybe not using vCard-3.0 outside of a MIME context might be a good idea.

HS
Comment 1 Robin Rosenberg 2004-07-11 17:24:37 UTC
I have this problem too. The vCards look like garbage when non-ascii is used in vcards sent to both kmail (via kmail) and my phone (sonyericsson k700).

in kmail some vcards turn up as unreadable (kmail simply refuses), while the phone actually imported it, though somewhat hard to read.

Comment 2 Tobias Koenig 2005-01-07 22:30:45 UTC
CVS commit by tokoe: 

Add ENCODING and CHARSET attributes vor vCard2.1 export.

BUG:82063


  M +74 -10    vcardtool.cpp   1.10



Comment 3 Tobias Koenig 2009-08-05 16:09:41 UTC
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.