UTF8 Encoding with vCards on Windows

I have implemented vCard on the website. The problem is that special characters are not correctly processed in windows.

I can make it work fine for Mac, but as soon as I open vcf on Windows (Windows Contacts), it gets corrupted. When I open vcf in Notepad, it usually displays characters.

I tried all the vcf versions that I could find (2.1.3.0.4.0). I used charset-utf-8 in my content header (text / x-vcard; charset: utf-8). I used N; CHARSET = utf-8: (and for other tags).

All to no avail.

Does anyone have a solution? Thank you for sharing your understanding.

Headers Used:

header("Content-type: text/x-vcard; charset=utf-8"); header("Content-Disposition: attachment; filename=".$this->filename.".vcf"); header("Pragma: public"); 
+7
source share
6 answers

I found that instead of delivery ;CHARSET=utf-8 in the vCard field I sent instead ;CHARSET=windows-1252 , which led to the correct opening of vcard in Outlook 2010.

Not a solution for everyone, but hope this helps someone.

+6
source

To import Outlook UTF-8 vCards, you need to open Outlook options, go to Advanced> International Options, and then select UTF-8 for outgoing emails and outgoing vCards ... And voila - import works!

Is it not obvious that you need to set export options to configure import ...? Thanks Microsoft: P

+6
source

Compared to 2 files, one of which works from another service and mine. It turned out that the working version of another service is using Content-Type: text/x-vcard; charset=iso-8859-1 Content-Type: text/x-vcard; charset=iso-8859-1 .

+1
source

Use ISO-8859-1 and everything should be in order. Just make sure that every part in the chain uses this encoding (.vcf file, encoding declarations in the .vcf file and your header).

Title:

 Content-Type: text/x-vcard; charset=iso-8859-1 

Vcard (example, must be saved with encoding iso-8859-1):

 N;CHARSET=iso-8859-1:Übermann 

Tested on Windows, OS X, iOS and Android.

+1
source

for me to work with UTF-8 and be readable for Mac OS X, all polishing characters, such as ĘĄĆŻŹŃŁÓŚ ęąćżźńłóś , were enough to switch to the VERSION:3.0 ad

+1
source

x-vcard is not supported for outlook 2013. If anyone knows, please share the supported content type for Outlook 2013

0
source

All Articles