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 440818 - Contacts with accents (CSV) are not properly imported
Contacts with accents (CSV) are not properly imported
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Contacts
2.8.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-addressbook-maintainers
Evolution QA team
: 440817 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-05-23 21:21 UTC by Rodrigo Castro
Modified: 2008-06-23 14:03 UTC
See Also:
GNOME target: ---
GNOME version: 2.7/2.8


Attachments
Contacts.csv (10.63 KB, text/plain)
2007-05-23 21:23 UTC, Rodrigo Castro
  Details
utf8.patch (2.50 KB, patch)
2007-05-23 21:27 UTC, Rodrigo Castro
reviewed Details | Review
updated patch (3.42 KB, text/plain)
2008-06-23 13:46 UTC, Milan Crha
  Details

Description Rodrigo Castro 2007-05-23 21:21:18 UTC
Evolution does not import any contacts exported as a CSV file from Outlook and Mozilla (these were the cases I tested) that have accented characters. These characters are replaced by many symbol characters, making the contact name longer and incorrect. Contacts that have only non-accented characters work fine.
Comment 1 Rodrigo Castro 2007-05-23 21:23:43 UTC
Created attachment 88701 [details]
Contacts.csv

Example Outlook CSV file that has this problem (it's in French).
Comment 2 Rodrigo Castro 2007-05-23 21:27:22 UTC
Created attachment 88703 [details] [review]
utf8.patch

I created a patch that solves this problem for latin languages like French, Portuguese, Spanish, etc. It may serve as base for a more generic solution. Comments are welcome!
Comment 3 Pedro Villavicencio 2007-05-23 22:55:43 UTC
*** Bug 440817 has been marked as a duplicate of this bug. ***
Comment 4 André Klapper 2007-05-23 23:32:40 UTC
also see bug 334176...
Comment 5 Rodrigo Castro 2007-05-24 12:29:46 UTC
Thanks for letting me know. It works here with that example file (as I commented in that report).
Comment 6 Srinivasa Ragavan 2007-05-28 15:59:39 UTC
Moving to Addressbook.
Comment 7 Milan Crha 2008-06-20 16:35:18 UTC
Hi Rodrigo, your patch looks fine, I thought we can reuse the default charset from mail instead of ISO-8859-1, but it's under /mail/display/charset, thus probably not so good here.

When I'm looking into the code you changed, then I would like to suggest to check for eof in reading between quotes, because the code as is now can stop responding very easily, when passing there a broken file. I know, it's not your code, but if you would mind. (I know, I know, it's more than a year old patch...)
Comment 8 Milan Crha 2008-06-23 13:46:43 UTC
Created attachment 113258 [details]
updated patch
Comment 9 Milan Crha 2008-06-23 13:49:53 UTC
Updated patch committed to trunk. Committed revision 35677.
Comment 10 Milan Crha 2008-06-23 14:03:04 UTC
Actually, the committed patch leaks memory. I'll fix it within the bug #539755.