vCard : a file format standard for electronic business cards[通俗易懂]

vCard : a file format standard for electronic business cards[通俗易懂]http://zh.wikipedia.org/wiki/VCardvCard是电子名片的文件格式标准

http://zh.wikipedia.org/wiki/VCard

vCard是电子名片的文件格式标准。它一般附加在电子邮件之后,但也可以用于其它场合(如在互联网上相互交换)。

vCard可包含的信息有:姓名、地址资讯、电话号码、URLlogo,相片等。

历史

vCard(或称做Versitcard)最早是由Versit联盟于1995年提出的,当时联盟成员包括

苹果公司,AT&T科技(后来的朗讯),IBM及西门子。

在1996年十二月,格式的拥有权移至互联网邮件联盟(IMC),此联盟是由一些关注互联网电子邮件的公司所组成。

与vCard一同提出的用于数据交换的标准还有vCalendar,但现在被iCalendar所取代。

互联网邮件联盟已经声明它希望“所有的vCalendar开发者利用这些新的开放标准,并使软件能够同时兼容vCalendar 1.0和iCalendar。”

vCard标准的2.1版被电子邮件客户端广泛支持。

3.0版是一个包含在RFC 2425和RFC 2426中的IETF标准跟踪提案。

vCard的常用文件扩展名是.vcf。

不同的程序对vCard标准实现亦不同。

Mac OS X中的Address Book允许把所有联系人导出到一个vcf文件,

而Microsoft Outlook只能每人一个文件。

Linux中KDE的Kontact允许每个文件导入或导出一人或多人。

vCard文件样例

BEGIN:VCARD
VERSION:2.1
N:Gump;Forrest
FN:Forrest Gump
ORG:Gump Shrimp Co.
TITLE:Shrimp Man
TEL;WORK;VOICE:(111) 555-1212
TEL;HOME;VOICE:(404) 555-1212
ADR;WORK:;;100 Waters Edge;Baytown;LA;30314;United States of America
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:100 Waters Edge=0D=0ABaytown, LA 30314=0D=0AUnited States of America
ADR;HOME:;;42 Plantation St.;Baytown;LA;30314;United States of America
LABEL;HOME;ENCODING=QUOTED-PRINTABLE:42 Plantation St.=0D=0ABaytown, LA 30314=0D=0AUnited States of America
EMAIL;PREF;INTERNET:forrestgump@walladalla.com
REV:20080424T195243Z
END:VCARD

 

http://en.wikipedia.org/wiki/VCard

BEGIN:VCARD
VERSION:2.1
N:Gump;Forrest
FN:Forrest Gump
ORG:Bubba Gump Shrimp Co.
TITLE:Shrimp Man
PHOTO;GIF:http://www.example.com/dir_photos/my_photo.gif
TEL;WORK;VOICE:(111) 555-1212
TEL;HOME;VOICE:(404) 555-1212
ADR;WORK:;;100 Waters Edge;Baytown;LA;30314;United States of America
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:100 Waters Edge=0D=0ABaytown, LA 30314=0D=0AUnited States of America
ADR;HOME:;;42 Plantation St.;Baytown;LA;30314;United States of America
LABEL;HOME;ENCODING=QUOTED-PRINTABLE:42 Plantation St.=0D=0ABaytown, LA 30314=0D=0AUnited States of America
EMAIL;PREF;INTERNET:forrestgump@example.com
REV:20080424T195243Z
END:VCARD

 

BEGIN:VCARD
VERSION:3.0
N:Gump;Forrest;;Mr.
FN:Forrest Gump
ORG:Bubba Gump Shrimp Co.
TITLE:Shrimp Man
PHOTO;VALUE=URL;TYPE=GIF:http://www.example.com/dir_photos/my_photo.gif
TEL;TYPE=WORK,VOICE:(111) 555-12121
TEL;TYPE=HOME,VOICE:(404) 555-1212
ADR;TYPE=WORK:;;100 Waters Edge;Baytown;LA;30314;United States of America
LABEL;TYPE=WORK:100 Waters Edge\nBaytown, LA 30314\nUnited States of America
ADR;TYPE=HOME:;;42 Plantation St.;Baytown;LA;30314;United States of America
LABEL;TYPE=HOME:42 Plantation St.\nBaytown, LA 30314\nUnited States of America
EMAIL;TYPE=PREF,INTERNET:forrestgump@example.com
REV:2008-04-24T19:52:43Z
END:VCARD

 

BEGIN:VCARD
VERSION:4.0
N:Gump;Forrest;;;
FN:Forrest Gump
ORG:Bubba Gump Shrimp Co.
TITLE:Shrimp Man
PHOTO;MEDIATYPE=image/gif:http://www.example.com/dir_photos/my_photo.gif
TEL;TYPE=work,voice;VALUE=uri:tel:+1-111-555-1212
TEL;TYPE=home,voice;VALUE=uri:tel:+1-404-555-1212
ADR;TYPE=work;LABEL="100 Waters Edge\nBaytown, LA 30314\nUnited States of America"
  :;;100 Waters Edge;Baytown;LA;30314;United States of America
ADR;TYPE=home;LABEL="42 Plantation St.\nBaytown, LA 30314\nUnited States of America"
 :;;42 Plantation St.;Baytown;LA;30314;United States of America
EMAIL:forrestgump@example.com
REV:20080424T195243Z
END:VCARD

 

<?xml version="1.0" encoding="UTF-8"?>
<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0">
  <vcard>
    <tel>
      <parameters>
        <type>
          <text>work</text>
        </type>
      </parameters>
      <uri>tel:+1-111-555-1212</uri>
    </tel>
    <adr>
      <parameters>
        <type><text>work</text></type>
        <label><text>100 Waters Edge
                     Baytown, LA 30314
                     United States of America</text></label>
      </parameters>
    </adr>
    <email><text>forrestgump@example.com</text></email>
  </vcard>
</vcards>

["vcard",
  [
    ["version", {}, "text", "4.0"],
    ["n", {}, "text", ["Gump", "Forrest", "", "", ""]],
    ["fn", {}, "text", "Forrest Gump"],
    ["org", {}, "text", "Bubba Gump Shrimp Co"],
    ["title", {} ,"text", "Shrimp Man"],
    ["photo", {
   
   "mediatype":"image/gif"}, "uri", "http://www.example.com/dir_photos/my_photo.gif"],
    ["tel", {
   
   "type":["work", "voice"]}, "uri", "tel:+1-111-555-1212"],
    ["tel", {
   
   "type":["home", "voice"]}, "uri", "tel:+1-404-555-1212"],
    ["adr",
      {
    
    "label":"100 Waters Edge\nBaytown, LA 30314\nUnited States of America", "type":"work"},
      "text",
      ["", "", "100 Waters Edge", "Baytown", "LA", "30314", "United States of America"]
    ],
    ["adr",
      {
    
    "label":"42 Plantation St.\nBaytown, LA 30314\nUnited States of America", "type":"home"},
      "text",
      ["", "", "42 Plantation St.", "Baytown", "LA", "30314", "United States of America"]
    ],
    ["email", {}, "text", "forrestgump@example.com"],
    ["rev", {}, "timestamp", "2008-04-24T19:52:43Z"]
  ]
]

 

hCard is a microformat that allows a vCard to be embedded inside an HTML page.

It makes use of CSS class names to identify each vCard property.

Normal HTML markup and CSS styling can be used alongside the hCard class names without affecting the webpage’s ability to be parsed by a hCard parser.

<html>
  <head>
    <link rel="profile" href="http://microformats.org/profile/hcard" />
  </head>
  <body>
    <div class="vcard">
      <img class="photo" src="http://www.example.com/dir_photos/my_photo.gif" align="left" />
      <h1 class="fn">Forrest Gump</h1>
      <div class="email">
        <span class="type">Internet</span> Email (<span class="type">pref</span>erred):
        <a class="value" href="mailto:forrestgump@example.com">forrestgump@example.com</a>
      </div>
      <div class="n">
        First Name: <span class="given-name">Forrest</span><br>
        Last Name: <span class="family-name">Gump</span>
      </div>
 
      <div class="label" style="display:none">
        <span class="type">home</span>
        42 Plantation St.<br>Baytown, LA 30314<br>United States of America
      </div>
      <div class="adr">
        <span class="type">Home</span> Address:<br>
        <span class="street-address">42 Plantation St.</span><br>
        <span class="locality">Baytown</span>, <span class="region">LA</span>
        <span class="postal-code">30314</span><br>
        <span class="country-name">United States of America</span>
      </div>
      <div class="tel">
         <abbr class="type" title="voice"></abbr>
         <span class="type">Home</span> Phone: <span class="value">+1-111-555-1212</span>
      </div>
 
      <div>
        Organization: <span class="org">Bubba Gump Shrimp Co.</span><br>
        Title: <span class="title">Shrimp Man</span>
      </div>
 
      <div class="label" style="display:none">
        <span class="type">work</span>
        100 Waters Edge<br>Baytown, LA 30314<br>United States of America
      </div>
      <div class="adr">
        <span class="type">Work</span> Address:<br>
        <span class="street-address">100 Waters Edge</span><br>
        <span class="locality">Baytown</span>, <span class="region">LA</span>
        <span class="postal-code">30314</span><br>
        <span class="country-name">United States of America</span>
      </div>
      <div class="tel">
         <abbr class="type" title="voice"></abbr>
         <span class="type">Work</span> Phone: <span class="value">+1-404-555-1212</span>
      </div>
 
      <em>vCard last updated:</em>
      <time class="rev" datetime="2008-04-24T19:52:43Z">April 24, 2008 at 7:52 PM GMT</time>
    </div>
  </body>
</html>

 

Properties

vCard defines the following property types.

All vCards begin with BEGIN:VCARD and end with END:VCARD.

All vCards must contain the VERSION property, which specifies the vCard version. 

VERSION must come right after BEGIN (except in the vCard 2.1 standard, which allows it to be anywhere in the vCard).

Otherwise, properties can be defined in any order.

 

Name Versions Description Example
2.1 3.0 4.0
ADR Green tick Green tick Green tick A structured representation of the physical delivery address for the vCard object. ADR;TYPE=home:;;123 Main St.;Springfield;IL;12345;USA
AGENT Green tick Green tick   Information about another person who will act on behalf of the vCard object. Typically this would be an area administrator, assistant, or secretary for the individual. Can be either a URL or an embedded vCard. AGENT:http://mi5.gov.uk/007
ANNIVERSARY     Green tick Defines the person’s anniversary. ANNIVERSARY:19901021
BDAY Green tick Green tick Green tick Date of birth of the individual associated with the vCard. BDAY:19700310
BEGIN blue tick blue tick blue tick All vCards must start with this property. BEGIN:VCARD
CALADRURI     Green tick A URL to use for sending a scheduling request to the person’s calendar. CALADRURI:http://example.com/calendar/jdoe
CALURI     Green tick A URL to the person’s calendar. CALURI:http://example.com/calendar/jdoe
CATEGORIES Green tick Green tick Green tick A list of “tags” that can be used to describe the object represented by this vCard. CATEGORIES:swimmer,biker
CLASS   Green tick   Describes the sensitivity of the information in the vCard. CLASS:public
CLIENTPIDMAP     Green tick Used for synchronizing different revisions of the same vCard. CLIENTPIDMAP:1;urn:uuid:3df403f4-5924-4bb7-b077-3c711d9eb34b
EMAIL Green tick Green tick Green tick The address for electronic mail communication with the vCard object. EMAIL:johndoe@hotmail.com
END blue tick blue tick blue tick All vCards must end with this property. END:VCARD
FBURL     Green tick Defines a URL that shows when the person is “free” or “busy” on their calendar. FBURL:http://example.com/fb/jdoe
FN Green tick blue tick blue tick The formatted name string associated with the vCard object. FN:Dr. John Doe
GENDER     Green tick Defines the person’s gender. GENDER:F
GEO Green tick Green tick Green tick Specifies a latitude and longitude. 2.13.0GEO:39.95;-75.1667
4.0GEO:geo:39.95,-75.1667
IMPP   light green tick* Green tick Defines an instant messenger handle.

* This property was introduced in a separate RFC when the latest vCard version was 3.0. Therefore, 3.0 vCards may use this property, even though it’s not part of the 3.0 specs.

IMPP:aim:johndoe@aol.com
KEYGreen tickGreen tickGreen tickThe public encryption key associated with the vCard object. It may point to an external URL, may be plain text, or may be embedded in the vCard as a Base64 encoded block of text.2.1KEY;PGP:http://example.com/key.pgp
2.1KEY;PGP;ENCODING=BASE64:[base64-data]
3.0KEY;TYPE=PGP:http://example.com/key.pgp
3.0KEY;TYPE=PGP;ENCODING=B:[base64-data]
4.0KEY;MEDIATYPE=application/pgp-keys:http://example.com/key.pgp
4.0KEY:data:application/pgp-keys;base64,[base64-data]
KIND  Green tickDefines the type of entity that this vCard represents: ‘application’, ‘individual, ‘group’, ‘location’ or ‘organization’; ‘x-*’ values may be used for experimental purposes. cf.http://tools.ietf.org/html/rfc6350#section-6.1.4, http://tools.ietf.org/html/rfc6473 (‘application’ value)KIND:individual
LABELGreen tickGreen ticklight green tick*Represents the actual text that should be put on the mailing label when delivering a physical package to the person/object associated with the vCard (related to the ADR property).

* Not supported in version 4.0. Instead, this information is stored in the LABEL parameter of the ADRproperty.

LABEL;TYPE=HOME:123 Main St.\nSpringfield, IL 12345\nUSA
LANG  Green tickDefines a language that the person speaks.LANG:fr-CA
LOGOGreen tickGreen tickGreen tickAn image or graphic of the logo of the organization that is associated with the individual to which the vCard belongs. It may point to an external URL or may be embedded in the vCard as a Base64 encoded block of text.2.1LOGO;PNG:http://example.com/logo.png
2.1LOGO;PNG;ENCODING=BASE64:[base64-data]
3.0LOGO;TYPE=PNG:http://example.com/logo.png
3.0PHOTO;TYPE=PNG;ENCODING=B:[base64-data]
4.0:LOGO;MEDIATYPE=image/png:http://example.com/logo.png
4.0PHOTO:data:image/png;base64,[base64-data]
MAILERGreen tickGreen tick Type of email program used.MAILER:Thunderbird
MEMBER  Green tickDefines a member that is part of the group that this vCard represents. Acceptable values include:

  • a “mailto:” URL containing an email address
  • a UID which references the member’s own vCard

The KIND property must be set to “group” in order to use this property.

MEMBER:urn:uuid:03a0e51f-d1aa-4385-8a53-e29025acd8af
Nblue tickblue tickGreen tickA structured representation of the name of the person, place or thing associated with the vCard object.N:Doe;John;;Dr;
NAME Green tick Provides a textual representation of the SOURCE property. 
NICKNAME Green tickGreen tickOne or more descriptive/familiar names for the object represented by this vCard.NICKNAME:Jon,Johnny
NOTEGreen tickGreen tickGreen tickSpecifies supplemental information or a comment that is associated with the vCard.NOTE:I am proficient in Tiger-Crane Style,\nand I am more than proficient in the exquisite art of the Samurai sword.
ORGGreen tickGreen tickGreen tickThe name and optionally the unit(s) of the organization associated with the vCard object. This property is based on the X.520 Organization Name attribute and the X.520 Organization Unit attribute.ORG:Google;GMail Team;Spam Detection Squad
PHOTOGreen tickGreen tickGreen tickAn image or photograph of the individual associated with the vCard. It may point to an external URL or may be embedded in the vCard as a Base64 encoded block of text.2.1PHOTO;JPEG:http://example.com/photo.jpg
2.1PHOTO;JPEG;ENCODING=BASE64:[base64-data]
3.0PHOTO;TYPE=JPEG:http://example.com/photo.jpg
3.0PHOTO;TYPE=JPEG;ENCODING=B:[base64-data]
4.0:PHOTO;MEDIATYPE=image/jpeg:http://example.com/photo.jpg
4.0PHOTO:data:image/jpeg;base64,[base64-data]
PRODID Green tickGreen tickThe identifier for the product that created the vCard object.PRODID:-//ONLINE DIRECTORY//NONSGML Version 1//EN
PROFILEGreen tickGreen tick States that the vCard is a vCard.PROFILE:VCARD
RELATED  Green tickAnother entity that the person is related to. Acceptable values include:

  • a “mailto:” URL containing an email address
  • a UID which references the person’s own vCard
RELATED;TYPE=friend:urn:uuid:03a0e51f-d1aa-4385-8a53-e29025acd8af
REV Green tick Green tick Green tick A timestamp for the last time the vCard was updated. REV:20121201T134211Z
ROLE Green tick Green tick Green tick The role, occupation, or business category of the vCard object within an organization. ROLE:Executive
SORT-STRING Green tick Green tick light green tick* Defines a string that should be used when an application sorts this vCard in some way.

* Not supported in version 4.0. Instead, this information is stored in the SORT-AS parameter of the Nand/or ORG properties.

SORT-STRING:Doe
SOUNDGreen tickGreen tickGreen tickBy default, if this property is not grouped with other properties it specifies the pronunciation of the FNproperty of the vCard object. It may point to an external URL or may be embedded in the vCard as a Base64encoded block of text.2.1SOUND;OGG:http://example.com/sound.ogg
2.1SOUND;OGG;ENCODING=BASE64:[base64-data]
3.0SOUND;TYPE=OGG:http://example.com/sound.ogg
3.0SOUND;TYPE=OGG;ENCODING=B:[base64-data]
4.0:SOUND;MEDIATYPE=audio/ogg:http://example.com/sound.ogg
4.0SOUND:data:audio/ogg;base64,[base64-data]
SOURCEGreen tickGreen tickGreen tickA URL that can be used to get the latest version of this vCard.SOURCE:http://johndoe.com/vcard.vcf
TELGreen tickGreen tickGreen tickThe canonical number string for a telephone number for telephony communication with the vCard object.TEL;TYPE=cell:(123) 555-5832
TITLEGreen tickGreen tickGreen tickSpecifies the job title, functional position or function of the individual associated with the vCard object within an organization.TITLE:V.P. Research and Development
TZGreen tickGreen tickGreen tickThe time zone of the vCard object.2.13.0TZ:-0500
4.0TZ:America/New_York
UIDGreen tickGreen tickGreen tickSpecifies a value that represents a persistent, globally unique identifier associated with the object.UID:urn:uuid:da418720-3754-4631-a169-db89a02b831b
URLGreen tickGreen tickGreen tickA URL pointing to a website that represents the person in some way.URL:http://www.johndoe.com
VERSIONblue tickblue tickblue tickThe version of the vCard specification. In versions 3.0 and 4.0, this must come right after the BEGINproperty.VERSION:3.0
XML  Green tickAny XML data that is attached to the vCard. This is used if the vCard was encoded in XML (xCard standard) and the XML document contained elements which are not part of the xCard standard.XML:<b>Not an xCard XML element</b>

 

vCard

http://baike.baidu.com/view/495045.htm

vCard 规范容许公开交换个人数据交换 (Personal Data Interchange PDI) 信息,在传统纸质商业名片可找到这些信息。

规范定义电子名片(或叫vCard)的格式。 vCard 规范可作为各种应用或系统之间的交换格式。

定义的格式与传送的方法无关。传送交换可能是文件系统,点对点交换的公共电话网络,以有线网络或无线传送的方式。

用户能在互联网上直接利用vCard。电子邮件能转发在vCard中人信息。网页上很多用户填写的表格可自动使用vCard。

 

类型

NAME 类型
如果在内容中出现NAME类型,那么它的值是一个可以显示的,描述vCard源的文本
 
PROFILE类型
如果出现PROFILE类型,那么它的值必须是“VCARD”
 
SOURCE 类型
如果包含SOURCE类型,它的值提供一些怎样找到vCard源的信息
 
预定参数的用法
 
LANGUAGE
参考[MIME-DIR]文档
ENCODING
参考[MIME-DIR]文档
VALUE
参考[MIME-DIR]文档
 
预定义值类型的用法
 
在[MIME-DIR]中预定类型的值一定不能包含用逗号分开的列表,除N,NICKNAME, ADR和 CATEGORIES值类型外。
 
预定义值类型的扩展
 
BINARY
表明类型的值是二进制的,主要应用在类型PHOTO, LOGO, SOUND, and KEY中.
ENCODING参数的值必须指定为“B”
二进制的内容的编码参考[RFC 2047]
 
VCARD
表示一个类型的值是一个vCard对象
 
PHONE-NUMBER
表示类型的值是一个电话号码
 
UTC-OFFSET
表示时间
结构类型的值
 
复合类型值是用分号分开的字段的集合,复合类型值中避免使用分号,如何需要使用分号,需要用“\分号“替代行的限定和分行
参考[MIME DIR],如果行的长度超过了75个字符,那么必须分行。
 

标准通信薄基本格式

VCard 数据格式的标识符是VCARD
 
预定义的类型:
SOURCE, NAME, PROFILE, BEGIN, END.
新增加的类型:
FN, N, NICKNAME, PHOTO, BDAY, ADR, LABEL, TEL, EMAIL, 

MAILER, TZ, GEO, TITLE, ROLE, LOGO, AGENT, ORG, CATEGORIES,

NOTE,PRODID, REV, SORT-STRING, SOUND, URL, UID, VERSION, CLASS, KEY
 
预定义的值类型:uri, date, date-time, float
新增加的值类型:binary, phone-number, utc-offset and vcard value
 

预定义的参数:ENCODING, VALUE, CHARSET, LANGUAGE, CONTEXT

新增加的参数:TYPE
 
vCard数据格式行是: 类型 [;参数]:值
 
ADR;HOME;POSTAL;PARCEL:
;;街道地址;深圳;广东;433330;中国
 
ADR:是一个类型,表示是一条地址信息 
“;” 号是分隔符合 
HOME;POSTAL;PARCEL表示参数,表示ADR的用途或者是类别
 
:;;街道地址;深圳;广东;433330 中国 表示是一个ADR值,地址值
 
预定义类型的用法
 
BEGIN 和 END 类型
Vcard内容必须以BEGIN:VCARD开头,以END:VCARD结尾
 
参考一个vcard的例子1:
BEGIN:VCARD
VERSION:2.1
N:姓;名
FN:姓名NICKNAME:nickName
ORG:公司;部门
TITLE:职位
NOTE;ENCODING=QUOTED-PRINTABLE:=C6=E4=CB=FB
TEL;WORK;VOICE:电话1
TEL;WORK;VOICE:电话2
TEL;HOME;VOICE:电话1
TEL;HOME;VOICE:电话2
TEL;CELL;VOICE:
TEL;PAGER;VOICE:0755
TEL;WORK;FAX:传真
TEL;HOME;FAX:传真
ADR;WORK:;;单位地址;深圳;广东;433000;国家
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:=B5=A5=CE=BB=B5=D8=D6=B7
=C9=EE=DB=DA
=B9=E3=B6=AB
433000
=B9=FA=BC=D2
ADR;HOME;POSTAL;PARCEL:;;街道地址;深圳;广东;433330;中国
LABEL;HOME;ENCODING=QUOTED-PRINTABLE:=BD=D6=B5=C0=B5=D8=D6=B7
=C9=EE=DB=DA
=B9=E3=B6=AB
433330
=D6=D0=B9=FA
URL:网址
URL:单位主页
EMAIL;PREF;INTERNET:邮箱地址
X-QQ:38394246
X-ICQ:icq
X-WAB-GENDER:2
REV:20060220T180305Z
END:VCARD
 

标识类型

FN 类型定义
目的:vcard对象的名称,一个vcard对象必须包含FN类型。
例子:FN:Mr. John Q. Public\, Esq.
 
N类型定义
目的:FN表示一个vcard对象的名称,N表示这个对象名称的组成部分
例子:N:Public;John;Quinlan;Mr.;Esq.
N:Stevenson;John;Philip,Paul;Dr.;Jr.,M.D.,A.C.P.
各个组成部分可以用分号分号,每个组成部分可以用逗号。
 
NICKNAME类型定义
目的:表示别名
例子:NICKNAME:Robbie
NICKNAME:Jim,Jimmie
 
PHOTO类型定义
目的:vcard对象的图像信息
例子:PHOTO;VALUE=uri:图片地址
PHOTO;ENCODING=b;TYPE=JPEG:MIICajCCAdOgAwIBAgICBEUwDQYJKoZIhvcN
AQEEBQAwdzELMAkGA1UEBhMCVVMxLDAqBgNVBAoTI05ldHNjYXBlIENvbW11bm
ljYXRpb25zIENvcnBvcmF0aW9uMRwwGgYDVQQLExNJbmZvcm1hdGlvbiBTeXN0
&lt;…remainder of “B” encoded binary data…&gt;
 
如果使用内联的二进制数据表示图片信息,那么;ENCODING=b
 
BDAY类型定义
目的:表示出生日期
例子:BDAY:1996-04-15
BDAY:1953-10-15T23:10:00Z
BDAY:1987-09-27T08:30:00-06:00

ADR 类型定义
目的:是一个组合,用来表示一个地址信息,值类型是一个用分号分开的文本值

例子:

ADR;TYPE=dom,home,postal,parcel:;;123 Main Street;Any Town;CA;91921-1234;A

ADR;HOME;POSTAL;PARCEL:
;;街道地址;深圳;广东;444444;中国

组合由一下部分顺序的组成:
 
the post office box;
the extended address;
the street address;
the locality (e.g., city);
the region (e.g., state or province);
the postal code;
the country name
 
七个部分组成,如果,其他的一个部分没有,必须用分号分开
 
type 参数的说明
“dom” 国内地址
“intl” 国际地址
“parcel”包裹递送地址
“home” 居住地址;
“work”工作地址;
“pref” 有多个地址的时候,优先的地址
 
缺省的”TYPE=intl,postal,parcel,work”,可以替换
 
LABEL类型定义
目的:是一格式化的文本值,表示一个地址
例子:LABEL;TYPE=dom,home,postal,parcel:Mr.John Q. Public\, Esq.\n
Mail Drop: TNE QB\n123 Main Street\nAny Town\, CA 91921-1234
\nU.S.A.
type 参数的说明
“dom” 国内地址
“intl” 国际地址
“parcel”包裹递送地址
“home” 居住地址;
“work”工作地址;
“pref” 有多个地址的时候,优先的地址
缺省的”TYPE=intl,postal,parcel,work”,可以替换
和ADR的不同是 ADR的值是用分号分开的数据,LABEL就是一个格式化的文本。

电话通信地址类型

TEL类型定义
目的:指定一个电话号码
例子:TEL;TYPE=work,voice,pref,msg:+1-213-555-1234
说明:值是一个规范的全球唯一的电话号码
 
TYPE参数的值有:
 
“home”表示家庭电话
“msg” 表示这个号码支持语音
“work” 工作电话
“pref” 表示多个电话中最喜欢使用的电话
“voice” 声音电话号码
“fax”传真号码
“cell” 表示手机电话
“video” 视频电话
“pager” 传呼机
“bbs” 公开的广播系统的电话
“modem” 调制解调器电话
“car”车载电话
“isdn” ISDN连接电话号码
“pcs” 个人通信服务电话
缺省是 “voice”.
 
TYPE参数的用法是TYPE=work;
TYPE=voice或者”
TYPE=work,voice”,缺省值可以被重置
 
“TYPE=work,home,voice,fax”.
 
EMAIL类型定义
目的:指定一个电子邮件
例子:EMAIL;TYPE=internet:邮箱地址
EMAIL;TYPE=x400:邮箱地址
EMAIL;TYPE=internet,pref:邮箱地址
 
TYPE参数的使用
“internet” 表示一个internet 类型地址
“x400” 表示是一个 X.400 地址
“pref”最喜欢使用的邮件电子
缺省是”internet”.
 
MAILER 类型定义
目的:指定一个电子邮件发送者
例子:MAILER:PigeonMail 2.1

地理类型

TZ类型定义
目的:时区信息
例子:TZ:-05:00
TZ;VALUE=text:-05:00; EST; Raleigh/North America
缺省是一个utc-offset值.
 
GEO类型定义
目的:地理位置信息
例子GEO:37.386013;-122.082932
CEO 经度;纬度

组织类型

TITLE类型定义
目的:工作位置,工作职能(job title)
例子TITLE:Director\, Research and Development
 
ROLE 类型定义
目的:公司的职业(occupation)
例子ROLE:Programmer
 
LOGO类型定义
目的:公司logo,是一个图像信息
例子LOGO;VALUE=uri:图片地址
LOGO;ENCODING=b;TYPE=JPEG:MIICajCCAdOgAwIBAgICBEUwDQYJKoZIhvcN AQEEBQAwdzELMAkGA1UEBhMCVVMxLDAqBgNVBAoTI05ldHNjYXBlIENvbW11bm
ljYXRpb25zIENvcnBvcmF0aW9uMRwwGgYDVQQLExNJbmZvcm1hdGlvbiBTeXN0
&lt;…the remainder of “B” encoded binary data…&gt;
说明:TYPE知道图像的格式,ENCODING=b表示是二进制的数据流
URI表示是一个外部图像对象
 
AGENT类型定义
目的:指定另外一个人替换他的个人行为
例子:AGENT;VALUE=uri: CID:JQPUBLIC.part3.960129T083020.邮箱地址
AGENT:BEGIN:VCARD\nFN:Susan Thomas\nTEL:+1-919-555-
1234\nEMAIL\;INTERNET:主机地址\nEND:VCARD\n
说明:缺省是一个Vcard对象,当时也可是一个URI指定的外部Vcard对象
 
ORG类型定义
目的:表示一个组织的名称
例子ORG:ABC\, Inc.;North American Division;Marketing

解释类型

CATEGORIES类型定义
目的:vcard应用的分类信息
例子:CATEGORIES:TRAVEL AGENT
CATEGORIES:INTERNET,IETF,INDUSTRY,INFORMATION TECHNOLOGY
 
NOTE 类型定义
目的:对vcard的注释和说明
例子:NOTE:This fax number is operational 0800 to 1715
EST\, Mon-Fri.
 
PRODID类型定义
目的:指定创建Vcard对象的产品的ID
例子:PRODID:-//ONLINE DIRECTORY//NONSGML Version 1//EN
 
REV类型定义
目的:指定当前Vcard的修改信息
例子:REV:1995-10-31T22:27:10Z
REV:1997-11-15
 
SORT-STRING类型定义
目的:指定家庭名称或者其他名称对FN和N类型排序
例子: FN:Rene van der Harten
N:van der Harten;Rene;J.;Sir;R.D.O.N.
SORT-STRING:Harten
FN:Robert Pau Shou Chang
N:Pau;Shou Chang;Robert
SORT-STRING:Pau
FN:Osamu Koura
N:Koura;Osamu
SORT-STRING:Koura
FN:Oscar del Pozo
N:del Pozo Triscon;Oscar
SORT-STRING:Pozo
FN:Chistine d’Aboville
N:d’Aboville;Christine
SORT-STRING:Aboville
 
SOUND类型定义
目的:指定Vcard的数字声音信息,缺省是指定vcard的name类型的发音信息。
例子: SOUND;TYPE=BASIC;VALUE=uri:CID:JOHNQPUBLIC.part8.
19960229T080000.地址
SOUND;TYPE=BASIC;ENCODING=b:MIICajCCAdOgAwIBAgICBEUwDQYJKoZIhvcN AQEEBQAwdzELMAkGA1UEBhMCVVMxLDAqBgNVBAoTI05ldHNjYXBlIENvbW11bm ljYXRpb25zIENvcnBvcmF0aW9uMRwwGgYDVQQLExNJbmZvcm1hdGlvbiBTeXN0 &lt;…the remainder of “B” encoded binary data…&gt;
可以用URI指定一个外部声音二进制流
可以是内置的声音二进制流,ENCODING=b
 
UID类型定义
目的:指定一个全球唯一的个人或资源标识。
例子:UID:19950401-080045-40000F192713-0052
 
URL类型定义
目的:指定Vcard 参考的路径。
例子:URL: 网址
 
VERSION类型定义
目的:指定Vcard使用的vcard规范的版本。
例子: VERSION:3.0

Security 类型

CLASS类型定义
目的:指定访问Vcard对象的访问分级。
例子: CLASS:PUBLIC
CLASS:PRIVATE
CLASS:CONFIDENTIAL
说明:安全分级需要参考目录服务的访问分级
 
KEY 类型定义
目的:指定Vcard的公共钥匙值(加密解密是使用)或者是授权认证。
例子: KEY;ENCODING=b:MIICajCCAdOgAwIBAgICBEUwDQYJKoZIhvcNAQEEBQA
wdzELMAkGA1UEBhMCVVMxLDAqBgNVBAoTI05ldHNjYXBlIENbW11bmljYX
Rpb25zIENvcnBvcmF0aW9uMRwwGgYDVQQLExNJbmZvcm1hdGlvbiBTeXN0
ZW1zMRwwGgYDVQQDExNyb290Y2EubmV0c2NhcGUuY29tMB4XDTk3MDYwNj
E5NDc1OVoXDTk3MTIwMzE5NDc1OVowgYkxCzAJBgNVBAYTAlVTMSYwJAYD
VQQKEx1OZXRzY2FwZSBDb21tdW5pY2F0aW9ucyBDb3JwLjEYMBYGA1UEAx
MPVGltb3RoeSBBIEhvd2VzMSEwHwYJKoZIhvcNAQkBFhJob3dlc0BuZXRz
Y2FwZS5jb20xFTATBgoJkiaJk/IsZAEBEwVob3dlczBcMA0GCSqGSIb3DQ
EBAQUAA0sAMEgCQQC0JZf6wkg8pLMXHHCUvMfL5H6zjSk4vTTXZpYyrdN2
dXcoX49LKiOmgeJSzoiFKHtLOIboyludF90CgqcxtwKnAgMBAAGjNjA0MB
EGCWCGSAGG+EIBAQQEAwIAoDAfBgNVHSMEGDAWgBT84FToB/GV3jr3mcau
+hUMbsQukjANBgkqhkiG9w0BAQQFAAOBgQBexv7o7mi3PLXadkmNP9LcIP
mx93HGp0Kgyx1jIVMyNgsemeAwBM+MSlhMfcpbTrONwNjZYW8vJDSoi//y
rZlVt9bJbs7MNYZVsyF1unsqaln4/vy6Uawfg8VUMk1U7jt8LYpo4YULU7
UZHPYVUaSgVttImOHZIKi4hlPXBOhcUQ==

扩展类型

可以定义自己的类型,自己定义的类型需要以“x-”开头
比喻例子中的信息:
X-QQ:000000
X-ICQ:icq
X-WAB-GENDER:2

 

44

 

转载于:https://www.cnblogs.com/shangdawei/p/4072539.html

今天的文章vCard : a file format standard for electronic business cards[通俗易懂]分享到此就结束了,感谢您的阅读。

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/83747.html

(0)
编程小号编程小号

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注