After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 243998 - Problems importing vcards in other than iso-8859-1 encoding.
Problems importing vcards in other than iso-8859-1 encoding.
Status: RESOLVED OBSOLETE
Product: evolution
Classification: Applications
Component: Contacts
3.2.x (obsolete)
Other All
: Normal normal
: ---
Assigned To: evolution-addressbook-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2003-06-01 13:21 UTC by Petr Tomasek
Modified: 2021-05-19 11:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GnomeCard.gcrd (99 bytes, text/vcard)
2012-01-25 15:29 UTC, Stanislav Brabec
Details
linka3.vnt (532 bytes, text/vnote)
2012-01-25 15:36 UTC, Stanislav Brabec
Details

Description Petr Tomasek 2003-06-01 13:21:09 UTC
VCards encoded in encoding other than iso-8859-1 won't import properly:

1) If I try to import vCard 3.0 (as described in RFC2425), it always
assumes it is in iso-8859-1. The same happens even if I send the vCard in a
mail message with correctly specified encoding in MIME headers.

=> I suggest, when importing vCard v3.0 (i.e. without the "CHARSET="
properties), to honour the encoding as specified in the MIME-headers, or
when not possible (importing from a file) use the default encoding for
current locale or ask user.

2) If I add "CHARSET=" properties to the vCard (as specified in the vCard
2.1 specs), the vCard is imported several times with various combinations
of fields being encoded in either encoding specified by the "CHARSET=" or
iso-8859-1.

=> I suggest, that if a vCard contains any "CHARSET=" properies, it should
be imported _only once_ honouring the specified charset.
Comment 1 Stanislav Brabec 2003-06-03 16:06:58 UTC
I can confirm these problems for importing from both kaddressbook and
gnome-pim.

Suggested solution (use current locale encoding) is not sufficient,
because for example kaddressbook VCard uses UTF-8 also in ISO-8859-2
locales.

The best solution for import from file is "ask user".

In case of import all settings, program can guess (gnome-pim -
locale-specific, kaddressbook-3 - UTF-8).
Comment 2 André Klapper 2004-05-10 17:41:29 UTC
as discussed on irc marking this as a part of bug 240756 which is about 
support of vcard 3.0.

*** This bug has been marked as a duplicate of 240756 ***
Comment 3 Chris Toshok 2004-06-11 20:02:41 UTC
this bug should be a dep of 40756, not a duplicate.
Comment 4 André Klapper 2006-05-31 19:52:10 UTC
removing old target milestone
Comment 5 André Klapper 2008-11-24 11:04:34 UTC
Isn't this obsolete? My impression was that when CHARSET is missing it is considered UTF-8. Also see bug 560681.
Comment 6 Stanislav Brabec 2008-11-24 14:16:55 UTC
As report and comment #1 say, such simple assumption does not work:

Import RFC2425 vCard 3.0: CHARSET is missing => needs ISO-8859-1.

Import from gnome-pim: CHARSET is missing => needs locale-specific value, e. g. ISO-8859-2.

Import from kaddressbook-3: CHARSET is missing => needs UTF-8.
Comment 7 Petr Tomasek 2008-12-30 20:45:22 UTC
comment #5 : Yes, see RFC2445, sec. 4.1.4.

See also bug 557341.
Comment 8 André Klapper 2012-01-16 12:31:55 UTC
Anybody having a testcase that could be attached here (without confidential data included)?
Comment 9 Stanislav Brabec 2012-01-25 15:29:56 UTC
Created attachment 206095 [details]
GnomeCard.gcrd

Vcard file, as it was created by GnomeCard. (Who remembers it?) No information about encoding was provided.
Comment 10 Stanislav Brabec 2012-01-25 15:36:19 UTC
Created attachment 206096 [details]
linka3.vnt

Example of Vnote file with a very obscure encoding. The text charset is UTF-7, the result was then encoded by quoted-printable encoding.

(I know, that Evolution does not support Vnote format yet, but you can use it as a cut/paste source for, say, address.)

This example was generated by the SE T630 mobile phone.
Comment 11 André Klapper 2012-01-27 11:02:15 UTC
(In reply to comment #9)
> Created an attachment (id=206095) [details]
> GnomeCard.gcrd

Even gedit fails, considering it ISO-8859-15:
It displays zkou¹ka instead of zkouška. :-/
Comment 12 Stanislav Brabec 2012-01-30 17:59:22 UTC
No, gedit does not fail. This file does not contain any charset hint. GnomeCard used Vcard file that always used charset equal to the locale charset.

There is no way to discriminate between ISO-8859-1 and ISO-8859-2. If you add ISO-8859-2 to and remove ISO-8859-1 from gedit list of charsets, it will open it properly.

Was to import such file:
- Ask user.
- Use contents based heuristics (e. g. ENCA) for initial guess. (But still needs to ask user - names are not easy to identify.)
Comment 13 André Klapper 2021-05-19 11:57:36 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. 
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/Community/GettingInTouch/BugReportingGuidelines
and create a new bug report ticket at
  https://gitlab.gnome.org/GNOME/evolution/-/issues/

Thank you for your understanding and your help.