nextcloud / contacts

📇 Contacts app for Nextcloud
https://apps.nextcloud.com/apps/contacts
GNU Affero General Public License v3.0
570 stars 173 forks source link

umlauts make name disappear #946

Closed beinaendi closed 3 months ago

beinaendi commented 5 years ago

Hi everybody,

I am a German speaking person, thus many of my contacts have umlauts like ä, ö, ü. When I download any contact group as vcf, it works perfectly, but prenames or surnames with umlauts are deleted completely.

To reproduce

  1. Make a new contact just like "Max Müller"
  2. Add the contact to a group
  3. Download the Group
  4. Import the vcf file in your contacts programm (in my case contacts on OS X)
  5. "Max Müller" will appear as "Max" without any surname

This happens on next cloud 15.0.4 with contacts 3.0.3

Best wishes

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/70437041-umlauts-make-name-disappear?utm_campaign=plugin&utm_content=tracker%2F46751899&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F46751899&utm_medium=issues&utm_source=github).
nextcloud-bot commented 5 years ago

GitMate.io thinks possibly related issues are https://github.com/nextcloud/contacts/issues/28 (Make fails), https://github.com/nextcloud/contacts/issues/251 (Phonetic name support), https://github.com/nextcloud/contacts/issues/76 (make command fails), https://github.com/nextcloud/contacts/issues/90 ([UX] Some contact card colours make contact name text unreadable), and https://github.com/nextcloud/contacts/issues/341 (Some make command warnings).

skjnldsv commented 5 years ago

@beinaendi Hello and thanks for your report :) Could you attach the vcf file here please? (rename to .txt)

beinaendi commented 5 years ago

@skjnldsv Hello, of course not ;-) But I made you an example with Max Müller. After downloading it, the surname appears as "M¸ller". Please find the renamed vcf file attached. test.txt

skjnldsv commented 5 years ago

@beinaendi okay, so the display of the contact is ok on the nextcloud contacts app, correct? Only when importing it into your OSX contacts manager it starts to misbehave?

Because looking at your vcard, FN:Max Müller is correct and have the proper umlaut, and N;SORT-AS=Max Müller:Müller;Max;;; as well :woman_shrugging:

beinaendi commented 5 years ago

@skjnldsv Yes, on the website everything appears perfect. But when I press the download button (arrow down) next to the contact group, this is what happens. I cannot understand why the vcard looks correct on your computer. This is what it looks like on a Mac with macOS Mojave 10.14.3

BEGIN:VCARD VERSION:3.0 PRODID:-//Sabre//Sabre VObject 4.1.6//EN UID:urn:uuid:40595350-0230-4a91-9863-9eeccf416771 FN:Max M¸ller CATEGORIES:test N;SORT-AS=Max M¸ller:M¸ller;Max;;; EMAIL;TYPE=PREF:max@mueller.de TEL;TYPE=CELL:+49 123 456789 ORG:Max AG; END:VCARD

beinaendi commented 5 years ago

So it seems to be an OS X issue. Tried to open the file with TextEdit, BBEdit and Word. Same problem in all programs.

beinaendi commented 5 years ago

@skjnldsv [EDIT] I am sorry, the provided solution doesn't work out. When I do as follows, I can see the text with correct letters:

But although there is now "Max Müller" in the file, I cannot import it correctly to contacts app no matter what kind of encoding I choose.

beinaendi commented 5 years ago

@skjnldsv I finally found a workaround.

If I use a texteditor and open the file using text encoding "Western (Windows 1 Latin)", then save it encoded as "UTF-8" it everything works out fine.

What's still a bit strange for me is the fact, that it doesn't give me the correct result, when I import the vcf file directly in contacts app using "Western (Windows 1 Latin)".

Maybe this helps to solve the problem on your side?

skjnldsv commented 5 years ago

Hum, that is strange. It seems indeed that the server is encoding everything in iso-8859-1 (looking at your file).

Creating new contacts on my server is properly encoding them in utf-8 for a single vcard, but us-ascii for the group download. I'll check on it later!

call-me-matt commented 4 years ago

I can confirm this, downloading a contact or complete address book is in UTF-8, while downloading a group is in ISO-8859-15. (fortunately not a problem on linux)

call-me-matt commented 4 years ago

I think this simple addon fixes the issue: https://github.com/call-me-matt/contacts/commit/677da685feb01e16a5dd7ac9f89d8d2d9fbc9907

EDIT: this did not bring the complete solution, so I changed it once more. When I put the value into a blob first, just like it was originally, it seems to work. Can you verify? https://github.com/call-me-matt/contacts/tree/group-vcf-format

Snaptags commented 4 years ago

I have a similar issue using Calendar 2.0.3 on Nextcloud 18.0.6: Downloading groups containing NO special characters result in an utf-8 formatted file. I can re-import that file without any issues. If the group (or any of the contacts) contains special characters I'll get a "latin-1" formatted file and have to convert it to utf-8 manually in order to be able to import it again :-(