-
Notifications
You must be signed in to change notification settings - Fork 7
Syntax Style Differences
Mike Angstadt edited this page Sep 25, 2016
·
1 revision
The vobject data format has two "versions", which vinnie refers to as "old-style syntax" and "new-style syntax". They are similar, but not identical. The table below describes the differences.
Description | Old-style (vCard 2.1 and vCal 1.0) | New-style (vCard 3.0/4.0 and iCal 2.0) |
---|---|---|
Newlines in property values | Encoded newline sequences are not allowed in property values. A workaround is to encode the property value in quoted-printable encoding. | Newlines can be encoded as \n . |
Folding whitespace | Multiple whitespace characters can be used at the beginning of a line to denote that it is a continuation of the previous line. | Exactly one whitespace character must be used at the beginning of a line to denote that it is a continuation of the previous line. |
Whitespace in property syntax | Any whitespace surrounding the = character that separates a parameter name from its value should be ignored. Similarly, any whitespace surrounding the : character in BEGIN and END properties should also be ignored. |
Such whitespace should be treated as part of the value (however, spaces are technically not allowed to be part of property or parameter names according to the specifications). |
Nameless parameters | Parameter values that are unambiguous can be specified without a name. For example: NOTE;QUOTED-PRINTABLE instead of NOTE;ENCODING=QUOTED-PRINTABLE . |
All parameters must have names. |
Multi-valued parameters | Each value must be specified as an individual name/value pair. For example: ADR;TYPE=HOME;TYPE=PARCEL . |
Values can be specified in a comma-delimited list. For example: ADR;TYPE=HOME,PARCEL . |
Escaped characters in parameter values | Semicolon characters are escaped with a backslash (\; ). No other character can be escaped. |
If a parameter value contains characters that have meaning in the syntax (i.e. commas, semicolons, or colons), the value must be enclosed in double quotes. For example: ADR;LABEL="123 Main Str, Apt: 2B" . |
Characters permitted in groups, property names, and parameter names * | Any printable, 7-bit ASCII character except: []=:.,;
|
- , 0-9 , A-Z , a-z
|
Characters permitted in parameter values * | Any printable, 7-bit ASCII character except: []=:.,
|
Any printable character except: " . |
* vinnie is lenient about character validation. vinnie allows all characters to be written except those that break the syntax.
1 An overview of the vobject data format
3 Project Information
3.1 News
3.2 Supported Specifications
3.3 Changelog
4 Reference
4.1 Javadocs