Windows中使用vCard进行UTF8编码 [英] UTF8 Encoding with vCards in Windows

查看:231
本文介绍了Windows中使用vCard进行UTF8编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在网站上实施了vCard.问题是尽管在Windows上无法正确解析特殊字符.

I have implemented a vCard on a website. Problem is though that special characters are not parsed correctly on windows.

我可以使其在Mac上正常工作,但是一旦我在Windows(Windows联系人)中打开一个vcf,它就会变得混乱.当我在记事本中打开vcf时,它会正常显示字符.

I can get it to work fine for Mac, but as soon as I open a vcf in Windows (Windows Contacts) it gets messed up. When I open the vcf in Notepad it shows the characters normally.

我尝试了所有可以找到的vcf版本(2.1、3.0、4.0).我在内容类型标头(text/x-vcard; charset:utf-8)中使用了charset-utf-8.我用了N; CHARSET = utf-8 :(以及其他标签).

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

全部无济于事.

有人对此有解决方案吗?感谢您分享您的见识.

Does anyone has a solution for this? Thanks for sharing your insight.

使用的标题:

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

推荐答案

要使Outlook导入UTF-8电子名片,您必须打开Outlook选项,请转到高级> 国际选项,然后选择UTF-8作为传出电子邮件和传出vCard ...然后瞧瞧-导入有效!

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

不是很明显,必须设置导出选项才能设置导入...吗?谢谢微软:P

Isn't it obvious, that one has to set export options to setup import...? Thanks Microsoft :P

这篇关于Windows中使用vCard进行UTF8编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆