User tests: Successful: Unsuccessful:
Steps to reproduce the issue
Put in some contact information with ß ä ö ü inside and enable the Option .vcf for the contact view.
Download the vcf
Expected result
The vcf should contain the umlauts.
Actual result
On Apple devices the umlauts are shown correctly but but not in outlook on windows.
System information (as much as possible)
Additional comments
I added utf8decoding in the code, that fixes the problem. As i´m not a developer please review also the way how i fixed it.
This fixes issue: #7937
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
Title |
|
This breaks UTF8 characters here.
utf8_decode converts a UTF8 string into ISO-8859-1
so it may work for some latin characters (for example with umlauts) but not for Greek or Chinese, etc.
@infograf768 does it work with Greek/Chinese without this patch?
It does on Macintosh:
I added ä ݑώ⽋
i.e. an umlaut, an arabic, a greek and a japanese character in a few fields.
This is the vcf I get before this PR
BEGIN:VCARD
VERSION:3.0
N:Here;Contact;Name
FN:Contact Name Here
TITLE:Position ä ݑώ⽋
TEL;TYPE=WORK,VOICE:2224556
TEL;TYPE=WORK,FAX:Fax
TEL;TYPE=WORK,MOBILE:
ADR;TYPE=WORK:;;Street ä ݑώ⽋;City ä ݑώ⽋;State ä ݑώ⽋;;country ä ݑώ⽋
LABEL;TYPE=WORK:Street ä ݑώ⽋
City ä ݑώ⽋
State ä ݑώ⽋
country ä ݑώ⽋
EMAIL;TYPE=PREF,INTERNET:email@xn----7sblgc4ag8bhcd.xn--p1ai
URL:http://www.xn----7sblgc4ag8bhcd.xn--p1ai/master
REV:2015-09-24T09:47:00+02:00Z
END:VCARD
This is what we get after this patch...
BEGIN:VCARD
VERSION:3.0
N:Here;Contact;Name
FN:Contact Name Here
TITLE:Position ä ???
TEL;TYPE=WORK,VOICE:2224556
TEL;TYPE=WORK,FAX:Fax
TEL;TYPE=WORK,MOBILE:
ADR;TYPE=WORK:;;Street ä ???;City ä ???;State ä ???;;country ä ???
LABEL;TYPE=WORK:Street ä ???
City ä ???
State ä ???
country ä ???
EMAIL;TYPE=PREF,INTERNET:email@xn----7sblgc4ag8bhcd.xn--p1ai
URL:http://www.xn----7sblgc4ag8bhcd.xn--p1ai/master
REV:2015-09-24T09:47:00+02:00Z
END:VCARD
Each non-latin glyph is replaced by a ?
@infograf768 on a apple it works with german umlauts also, but not in win outlook
on a apple it works with german umlauts also, but not in win outlook
Yes, as stated in the link I gave above. We can't though provide wrong vcf because Windows is a piece of s...
In any case the solution provided here does not work.
Category | ⇒ | Components |
You should add the charset to the lines containing the value.
For UTF-8 this means:
FN:Contact Name Here
becomes
FN;CHARSET=UTF-8:Contact Name Here
all what i have read on the net says it will not help for microsoft apps.
You're right. I just tested it on the latest outlook with win 10. Doesn't work. Seems that microsoft doesn't obey standards again. Vcard version 3.0 requires the values to be in UTF-8.
Maybe it would be useful to build a switch that allows to export in different codesets depending on the browser's OS.
Not so simple:
1. Check that the string concerned contains ONLY glyphs that can be converted to ISO-8859-1
(or CP1252 for windows)
2. Check that the browser OS is Windows
3. Change the vcard version to 2.1 (3.0 does not use charset and has to be utf8)
4. Add the charset if all the conditions are met.
In any case the view
ROOT/components/com_contact/views/contact/view.vcf.php
can be overriden in the template if one is sure all contacts info will be ISO-8859-1
List is here:
http://goodtools.net/pages/HowCharactersMap.html
Rel_Number | 0 | ⇒ | 7937 |
Relation Type | ⇒ | Pull Request for |
Sorry, but based on the feedback by @infograf768 and that this seems to be a bug in Outlook, I think this PR should be closed. I'm not using Outlook on my Windows system and I'd rather have standards-compliant output than account for one program. (Even though it is admittedly the one with the largest distribution)
From what I understand it now doesn't work anywhere with UTF-8 characters, at least with the patch it works for people using a Mac? Is that correct? If so, I believe we should more this forward otherwise we may as well close it.
No. @infograf768 said it worked on a Mac without this patch
Category | Components | ⇒ | Front End Components |
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-07-31 21:33:39 |
Closed_By | ⇒ | roland-d |
Closing this PR because it can't solve the issue. Thank you for your contribution.
Not bad for a non developer :-)
Indentation gets lost somewhere and the comment is in German, fine for me but not the usual way we are doing it. Some code style issues on top.
Pretty normal for the first PR :-)