QR code business card production: MECARD and vCard


With the popularity of QR codes, QR code business cards can be saved directly to the mobile address book, which has gradually become popular.

Some QR code generation software can directly generate QR code business cards , but the number of fields that can be used is limited. Customizing QR code business cards is more flexible.

QR code business cards are actually characters arranged according to certain rules. Once you know the format definition, it is very convenient whether you use QR code generation software or program it yourself to generate QR codes.

Currently, the two more common and widely used QR code business card formats are MECARD and vCard.

It should be noted that no matter which format, the defining characters are half-width uppercase English characters . If definition characters need to be used in the text, such as ,, :, ;etc., they need to be escaped with backslashes.

MECARD

MECARD is defined by Japanese docomo company and has a relatively simple format.

basic definition

The MECARD format MECARD:starts with , each field consists of a key and a value , the key value: is separated by a colon , and the end of the field is determined by a semicolon ;.

Field definition

The definition of the field is actually the meaning of the key , which is the field name saved in the address book. Commonly used ones include

Address book field name key data definition
name N ,If it is an English name, you can separate first name and last name with commas . Before the comma is the last name . The separation function has different effects depending on the QR code scanning software. Some will ignore the comma and not separate it, and some will use the comma as part of the name.
pronunciation SOUND Because the company that defines this code is Japanese, the main function of this field is to indicate the katakana pronunciation used, and it can also be Nseparated by commas like with. Most Chinese QR code scanning software does not support this field.
Position TO Unknown word limit
Telephone TEL Supports 1 to 24 numbers
Facetime TEL OFF sameTEL
Mail EMAIL Unknown word limit
Remark NOTE Unknown word limit
Birthday BDAY 8 digits, 4 digits for year, 2 digits for month and 2 digits for day
address ADR The upper limit of the number of characters is unknown. According to the custom of English-speaking countries, countries, states, counties, cities, streets, room numbers, etc. are separated. Commas can be used to ,separate. The separation function is supported by some Chinese code scanning software .
URL URL The maximum number of characters is unknown, but the protocol ( http://) and the World Wide Web logo (www) cannot be filled in.
Nick name NICKNAME The upper limit of the number of characters is unknown. Some Chinese code scanning software supports this field.

Example

MECARD: N: Zhang, San; SOUND: zhangsan; TEL: 13999999999; TEL-AV: 13888888888; EMAIL: [email protected]; NOTE: Here is the note, you can write whatever you want; BDAY: 19990909; ADR: Here is the address, You can write whatever you want; URL: abc.xxxxxxxxxxxxx.com.cn; NICKNAME: Xiao Zhang;

vCard

vCard (or Versitcard) was first proposed by the Versit Alliance in 1995. At that time, alliance members included Apple, AT&T Technology (later Lucent), IBM and Siemens. In December 1996, ownership of the format moved to the Internet Mail Consortium (IMC), a group of companies focused on Internet email.

Version 2.1 of the vCard standard (RFC 2425) is widely supported by email clients. Version 3.0 is an IETF standards tracking proposal contained in RFC 2425 and RFC 2426. Version 4.0 (RFC 6350) is the latest version, but currently version 3.0 is actually the most commonly used format.

vCard data format identifier

  • Predefined value types: uri, date, date-time, float
  • Added value types: binary, phone-number, utc-offset and vcard value specifications
  • Predefined types: SOURCE, NAME, PROFILE, BEGIN, END
  • Added types: 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
  • Predefined parameters: ENCODING, VALUE, CHARSET, LANGUAGE, CONTEXT
  • Added parameters: TYPE

Predefinition is generally used to define the use of vCard, and the specific data content is added.

vCard basic format definition

vCard must BEGIN:VCARDstart with and END:VCARDend with . Define the second line as version number VERSION:3.0or VERSION:2.1.

The vCard object must contain FN, N and VERSION types

vCard data row format

The format of each row of vCard data is: type [ ;parameter ] :value
For example:
ADR;HOME;POSTAL;PARCEL:;;street address;Shenzhen;Guangdong;433330;China

identifier meaning
ADR type
; delimiter
;HOME;POSTAL;PARCEL Parameter, indicating the purpose or category of ADR
: Delimiter, indicating that what follows is a value of this type
:;;Street address;Shenzhen;Guangdong;433330;China value of type

Usage of predefined types

BEGIN,END

vCard must BEGIN:VCARDstart with and END:VCARDend with .

SOURCE

Type Purpose: Its value provides information on how to find the vCard source
Its Value Type: URI
type Usage: Rarely used

NAME

Type Purpose: Displayable presentation text associated with the vCard source
Its value type: text
type Usage: Rarely used

PROFILE

Type purpose: Identifies the type of directory entity to which the information in the content type belongs. Its value must use the vCard
type. Usage: Rarely used.

basic type

FN

Purpose: The name of the vcard object. A vcard object must contain the FN type.
Example: FN: Mr. John Q. Public, Esq.

N

Purpose: Name of N object
Example:

  • N:Public;John;Quinlan;Mr.;Esq.
  • N:Stevenson;John;Philip,Paul;Dr.;Jr.,MD,ACP
  • Semicolons can be used for each component, and commas can be used for each component.

NICKNAME

Purpose: To express aliases and nicknames
Example:

  • NICKNAME:Robbie
  • NICKNAME:Jim,Jimmie

PHOTO

Purpose: Image information of the vcard object
ENCODING: The default is uri, which can be explicitly specified as b, indicating binary data encoded as inline
VALUE: The default is a binary value, which can be explicitly specified as the value of uri
TYPE: Specify the image format (mainly used used in inline binaries)

example:

PHOTO;VALUE=uri:http://www.abc.com/pub/photos/jqpublic.gif
PHOTO;ENCODING=b;TYPE=JPEG:MIICajCCAdOgAwIBAgICBEUwDQYJKoZIhvcNAQEEBQAwdzELMAkGA1UEBhMCVVMxLDAqBgNVBAoTI05ldHNjYXBlIENvbW11bmljYXRpb25zIENvcnBvcmF0aW9uMRwwGgYDVQQLExNJbmZvcm1hdGlvbiBTeXN0

BDAY

Purpose: To indicate the date of birth
Example:

  • BDAY:1996-04-15
  • BDAY:1953-10-15T23:10:00Z
  • BDAY:1987-09-27T08:30:00-06:00

Correspondence address type

ADR

Purpose: It is a combination used to represent an address information. The value type is a text value separated by semicolons.
Example:

  • ADR;TYPE=dom,home,postal,parcel:;;123 Main Street;Any Town;CA;91921-1234;A
  • ADR;HOME;POSTAL;PARCEL:;;Street address;Shenzhen;Guangdong;444444;China

The combination consists of the following seven parts in sequence. If a part is not available, use semicolons to ;separate empty data:

the post office box; (email)
the extended address; (specific address)
the street address; (street address)
the locality (eg, city); (location/city)
the region (eg, state or province); (region/ state or province)
the postal code; (postal code)
the country name (country)

TYEP parameter description:

  • “dom” domestic address
  • "intl" international address
  • “postal” postal delivery address
  • "parcel" package delivery address
  • "home" residential address;
  • "work" work address;
  • "pref" When there are multiple addresses, the preferred delivery address is

Default "TYPE=intl,postal,parcel,work", can be replaced

LABEL

Purpose: It is a formatted text value that represents an address.
Example:
LABEL;TYPE=dom,home,postal,parcel:Mr.John Q. Public/, Esq./nMail Drop: TNE QB/n123 Main Street/nAny Town /, CA 91921-1234/nU.SA

Similar to ADR, the difference is that the value of ADR is structured text, while the value of LABEL is formatted single text.

Telecom communication type

TEL

Purpose: Specify a phone number
Example: TEL;TYPE=work,voice,pref,msg:+1-213-555-1234
Description: The value is a standardized globally unique phone number

The values ​​of the TYPE parameter are:

"home" means home phone
"msg" means voice messaging
"work" work phone
"pref" means favorite phone among multiple phones
"voice" voice phone number
"fax" fax number
"cell" means mobile phone number
"video" ” Video phone
“pager” Paging device number
“bbs” Bulletin board system number
“modem” Modem phone
“car” Car phone
“isdn” ISDN connection phone number
“pcs” Personal communications service phone

The default value of the TYPE parameter is "voice", the format is similar to ADR, and can be replaced.

EMAIL

Purpose: Specify an email
Example:

  • EMAIL;TYPE=internet:email address
  • EMAIL;TYPE=x400:Email address
  • EMAIL;TYPE=internet,pref:email address

The TYPE parameter indicates the addressing type. Available values ​​are:

"internet" represents an internet type address
"x400" represents an X.400 address
"pref" favorite email address

Default is "internet"

MAILER

Purpose: Specify an email sender
Example: MAILER: PigeonMail 2.1

geography type

TZ

Purpose: Time zone information
Example:

  • TZ:-05:00
  • TZ;VALUE=text:-05:00; EST; Raleigh/North America

The parameter defaults to a utc-offset (utc offset) value, and can also be set to a single text value.

GEO

Purpose: geographical location information
Example: GEO:37.386013;-122.082932
Meaning: CEO longitude; latitude

Organization type

TITLE

Purpose: job title
Example: TITLE: Director, Research and Development

ROLE

Purpose: Occupation
Example: ROLE:Programmer

LOGO

Purpose: The company logo is an image information, the same as PHOTO
Example: LOGO;VALUE=uri: http://www.abc.com/pub/logos/abccorp.jpg

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

目的:分类信息,例如旅行社、互联网、IT、工业、信息技术等
例子:

  • CATEGORIES:TRAVEL AGENT
  • CATEGORIES:INTERNET,IETF,INDUSTRY,INFORMATION TECHNOLOGY

NOTE

目的:对vcard的注释和说明
例子:NOTE:This fax number is operational 0800 to 1715EST, 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

Purpose: Specify which segment in FNor Nto sort by, rather than sort alphabetically
. For example:

FN:Rene van der Harten
N:van der Harten;Rene;J.;Sir;RDON
SORT-STRING:Harten

SOUND

Purpose: Specify the digital sound information of Vcard. The default is to specify the pronunciation information of the name type of vcard.
example:

  • SOUND;TYPE=BASIC;VALUE=uri:CID:[email protected]
  • SOUND;TYPE=BASIC;ENCODING=b:MIICajCCAdOgAwIBAgICBEUwDQYJKoZIhvcNAQEEBQAwdzELMAkGA1UEBhMCVVMxLDAqBgljYXRpb25zIENvcnBvcmF0aW9uMRwwGgYDVQQLExNJbmZvcm1hdGlvbiBTeXN0

Similar to PHOTO, you can specify an external uri or use inline binary information

UID

Purpose: Specify a globally unique personal or resource identifier.
Example: UID:19950401-080045-40000F192713-0052

URL

Purpose: Specify the associated URL of the vCard.
Example: URL: http://www.swbyps.restaurant.french/~chezchic.html

VERSION

Purpose: Specify the specification version used by this vCard.
Example: VERSION:3.0

security type

CLASS

Purpose: Specify the access level for accessing the Vcard object. Such as public, private, confidential
Example:

  • CLASS:PUBLIC
  • CLASS:PRIVATE
  • CLASS: CONFIDENTIAL
    Description: Security classification needs to refer to the access classification of the directory service

KEY

Purpose: Specify the public key value of Vcard (used for encryption and decryption) or authorization authentication.
example:

KEY;ENCODING=b:MIICajCCAdOgAwIBAgICBEUwDQYJKoZIhvcNAQEEBQAwdzELMAkGA1UEBhMCVVMxLDAqBgNVBAoTI05ldHNjYXBlIENbW11bmljYXRpb25zIENvcnBvcmF0aW9uMRwwGgYDVQQLExNJbmZvcm1hdGlvbiBTeXN0ZW1zMRwwGgYDVQQDExNyb290Y2EubmV0c2NhcGUuY29tMB4XDTk3MDYwNjE5NDc1OVoXDTk3MTIwMzE5NDc1OVowgYkxCzAJBgNVBAYTAlVTMSYwJAYDVQQKEx1OZXRzY2FwZSBDb21tdW5pY2F0aW9ucyBDb3JwLjEYMBYGA1UEAxMPVGltb3RoeSBBIEhvd2VzMSEwHwYJKoZIhvcNAQkBFhJob3dlc0BuZXRzY2FwZS5jb20xFTATBgoJkiaJk/IsZAEBEwVob3dlczBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQC0JZf6wkg8pLMXHHCUvMfL5H6zjSk4vTTXZpYyrdN2dXcoX49LKiOmgeJSzoiFKHtLOIboyludF90CgqcxtwKnAgMBAAGjNjA0MBEGCWCGSAGG+EIBAQQEAwIAoDAfBgNVHSMEGDAWgBT84FToB/GV3jr3mcau+hUMbsQukjANBgkqhkiG9w0BAQQFAAOBgQBexv7o7mi3PLXadkmNP9LcIPmx93HGp0Kgyx1jIVMyNgsemeAwBM+MSlhMfcpbTrONwNjZYW8vJDSoi//yrZlVt9bJbs7MNYZVsyF1unsqaln4/vy6Uawfg8VUMk1U7jt8LYpo4YULU7UZHPYVUaSgVttImOHZIKi4hlPXBOhcUQ==

extension type

An extension type starts with X- and is a non-standard private communication type defined between collaborators without external registration or standardization.

Complete example

Version 2.1

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:[email protected]
REV:20080424T195243Z
END:VCARD

Version 3.0

BEGIN:VCARD
VERSION:3.0
N:Gump;Forrest
FN:Forrest Gump
ORG:Bubba Gump Shrimp Co.
TITLE:Shrimp Man
PHOTO;VALUE=URL;TYPE=GIF:/dir_photos/my_photo.gif
TEL;TYPE=WORK,VOICE:(111) 555-1212
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:[email protected]
REV:20080424T195243Z
END:VCARD

Guess you like

Origin blog.csdn.net/runsong911/article/details/131430800