diff --git a/components/com_contact/views/contact/view.vcf.php b/components/com_contact/views/contact/view.vcf.php index 8776b97baf15c..83a82c4b18fb4 100644 --- a/components/com_contact/views/contact/view.vcf.php +++ b/components/com_contact/views/contact/view.vcf.php @@ -88,23 +88,25 @@ public function display($tpl = null) $rev = date('c', strtotime($item->modified)); - JFactory::getApplication()->setHeader('Content-disposition', 'attachment; filename="' . $card_name . '.vcf"', true); + JFactory::getApplication()->setHeader('Content-disposition', 'attachment; filename="' . utf8_decode($card_name) . '.vcf"', true); $vcard = array(); $vcard[] .= 'BEGIN:VCARD'; $vcard[] .= 'VERSION:3.0'; - $vcard[] = 'N:' . $lastname . ';' . $firstname . ';' . $middlename; - $vcard[] = 'FN:' . $item->name; - $vcard[] = 'TITLE:' . $item->con_position; - $vcard[] = 'TEL;TYPE=WORK,VOICE:' . $item->telephone; - $vcard[] = 'TEL;TYPE=WORK,FAX:' . $item->fax; - $vcard[] = 'TEL;TYPE=WORK,MOBILE:' . $item->mobile; - $vcard[] = 'ADR;TYPE=WORK:;;' . $item->address . ';' . $item->suburb . ';' . $item->state . ';' . $item->postcode . ';' . $item->country; - $vcard[] = 'LABEL;TYPE=WORK:' . $item->address . "\n" . $item->suburb . "\n" . $item->state . "\n" . $item->postcode . "\n" . $item->country; - $vcard[] = 'EMAIL;TYPE=PREF,INTERNET:' . $item->email_to; - $vcard[] = 'URL:' . $item->webpage; - $vcard[] = 'REV:' . $rev . 'Z'; - $vcard[] = 'END:VCARD'; + $vcard[] = 'N:' . utf8_decode($lastname . ';' . $firstname . ';' . $middlename); + $vcard[] = 'FN:' . utf8_decode($item->name); + $vcard[] = 'TITLE:' . utf8_decode($item->con_position); + $vcard[] = 'TEL;TYPE=WORK,VOICE:' . $item->telephone; + $vcard[] = 'TEL;TYPE=WORK,FAX:' . $item->fax; + $vcard[] = 'TEL;TYPE=WORK,MOBILE:' . $item->mobile; + $vcard[] = 'ADR;TYPE=WORK:;;' . utf8_decode($item->address . ';' . $item->suburb . ';' + . $item->state . ';' . $item->postcode . ';' . $item->country); + $vcard[] = 'LABEL;TYPE=WORK:' . utf8_decode($item->address . "\n" . $item->suburb + . "\n" . $item->state . "\n" . $item->postcode . "\n" . $item->country); + $vcard[] = 'EMAIL;TYPE=PREF,INTERNET:' . $item->email_to; + $vcard[] = 'URL:' . $item->webpage; + $vcard[] = 'REV:' . $rev . 'Z'; + $vcard[] = 'END:VCARD'; echo implode("\n", $vcard); }