ProtonMail / proton-contacts

React web application to manage ProtonMail contacts
54 stars 19 forks source link

Contacts with Unicode characters cannot be imported #123

Open EmilMN opened 5 years ago

EmilMN commented 5 years ago

As discussed in https://github.com/ProtonMail/Angular/issues/8945, the issue from v3 is reproducible on v4.

Contacts with Unicode strings cannot be imported. These types of vCards are natively created by some Android devices and other software.

Steps to reproduce:

  1. Download .vcf file from the Angular issue
  2. Try to improt the .vcf file in v4 contacts app
  3. Notice no contacts are imported

Example:

2019-08-25_13-00-16

You can find the sample file in the original issue (linked above).

econdepe commented 5 years ago

The problem with the vcf file in https://github.com/ProtonMail/Angular/issues/8945 is not really the unicode characters, but the fact that the vcards in the vcf file are 2.1 instead of 4.0. It seems the current parser (from the library ICAL.js) does not recognize such format, so an intermediate parser must be used

mmso commented 5 years ago

In my opinion let's not support it if the vcf version is not 4.0

econdepe commented 5 years ago

That would be the easiest solution. Also, since vcards 4.0 are encoded in UTF8 there should be no issue with special characters (I tried some Arabic and it was fine). But I have no idea how many people are using older vcard formats

DeepSpaceHarbor commented 5 years ago

Google contacts uses vcard v3.0 and we need to check, but, I think there was at least one major email client that used vcard 2 for export.

EmilMN commented 5 years ago

I'm okay either way