? Failure
Pull Request for # 7937

User tests: Successful: Unsuccessful:

avatar designbengel
designbengel
24 Sep 2015

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

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
3.00

avatar designbengel designbengel - open - 24 Sep 2015
avatar designbengel designbengel - change - 24 Sep 2015
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 24 Sep 2015
Labels Added: ?
avatar designbengel designbengel - change - 24 Sep 2015
Title
Fix com_contact > created vcf in contactform can´t handle german umlauts #7937
Fix com_contact > created vcf in contactform can´t handle german umlauts (issue #7937)
avatar rdeutz
rdeutz - comment - 24 Sep 2015

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 :-)

avatar infograf768
infograf768 - comment - 24 Sep 2015

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.

avatar rdeutz
rdeutz - comment - 24 Sep 2015

@infograf768 does it work with Greek/Chinese without this patch?

avatar infograf768
infograf768 - comment - 24 Sep 2015

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 ?

avatar designbengel
designbengel - comment - 24 Sep 2015

@infograf768 on a apple it works with german umlauts also, but not in win outlook

avatar infograf768
infograf768 - comment - 24 Sep 2015

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... :smile:

In any case the solution provided here does not work.

avatar zero-24 zero-24 - change - 24 Sep 2015
Category Components
avatar balzercomp
balzercomp - comment - 25 Sep 2015

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

avatar infograf768
infograf768 - comment - 25 Sep 2015

all what i have read on the net says it will not help for microsoft apps.

avatar balzercomp
balzercomp - comment - 25 Sep 2015

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.

avatar balzercomp
balzercomp - comment - 26 Sep 2015

Maybe it would be useful to build a switch that allows to export in different codesets depending on the browser's OS.

avatar infograf768
infograf768 - comment - 26 Sep 2015

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.

avatar infograf768
infograf768 - comment - 26 Sep 2015

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

avatar brianteeman brianteeman - change - 3 Feb 2016
Rel_Number 0 7937
Relation Type Pull Request for
avatar Hackwar
Hackwar - comment - 23 Feb 2016

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)

avatar roland-d
roland-d - comment - 31 Jul 2016

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.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7938.

avatar brianteeman
brianteeman - comment - 31 Jul 2016

No. @infograf768 said it worked on a Mac without this patch


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7938.

avatar roland-d roland-d - edited - 31 Jul 2016
avatar joomla-cms-bot joomla-cms-bot - change - 31 Jul 2016
Category Components Front End Components
avatar roland-d roland-d - change - 31 Jul 2016
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2016-07-31 21:33:39
Closed_By roland-d
avatar roland-d roland-d - close - 31 Jul 2016
avatar roland-d
roland-d - comment - 31 Jul 2016

Closing this PR because it can't solve the issue. Thank you for your contribution.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7938.

Add a Comment

Login with GitHub to post a comment