Internet Engineering Task Force (IETF) C. Daboo
Request for Comments: 6868 Apple
Updates: 5545, 6321, 6350, 6351 February 2013
Category: Standards Track
ISSN: 2070-1721
Parameter Value Encoding in iCalendar and vCard
Daboo Standards Track [Page 1]
RFC 6868 Parameter Encoding February 2013
Table of Contents
1. Introduction
The iCalendar [RFC5545] specification defines a standard way to describe calendar data. The vCard [RFC6350] specification defines a standard way to describe contact data. Both of these use a similar text-based data format. Each iCalendar and vCard data object can include "properties" that have "parameters" and a "value". The value of a "parameter" is typically a token or URI value, but a "generic" text value is also allowed. However, the syntax rules for both iCalendar and vCard prevent the use of a double-quote character or control characters in such values, though double-quote characters and some subset of control characters are allowed in the actual property values.
2. Conventions Used in This Document
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].
Daboo Standards Track [Page 2]
RFC 6868 Parameter Encoding February 2013 3. Parameter Value Encoding SchemeThis specification defines the ^ character (U+005E -- Circumflex Accent) as an escape character in parameter values whose value type is defined using the "param-value" syntax element (Section 3.1 of iCalendar [RFC5545] and Section 3.3 of vCard [RFC6350]). The ^-escaping mechanism can be used when the value is either unquoted or quoted (i.e., whether or not the value is surrounded by double- quotes).
Daboo Standards Track [Page 3]
RFC 6868 Parameter Encoding February 2013 3.1. iCalendar ExampleThe following example is an "ATTENDEE" property with a "CN" parameter whose value includes two double-quote characters. The parameter value is not quoted, as there are no characters in the value that would trigger quoting as required by iCalendar.
3.2. vCard Example
The following example is a "GEO" property with an "X-ADDRESS" parameter whose value includes several line feed characters. The parameter value is also quoted, since it contains a comma, which triggers quoting as required by vCard.
4. Security Considerations
There are no additional security issues beyond those of iCalendar [RFC5545] and vCard [RFC6350].
5. Acknowledgments
Thanks to Michael Angstadt, Tim Bray, Mike Douglass, Barry Leiba, Simon Perreault, and Pete Resnick for feedback on this specification.
Daboo Standards Track [Page 4]
RFC 6868 Parameter Encoding February 2013 6. Normative References[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Daboo Standards Track [Page 5]
RFC 6868 Parameter Encoding February 2013 Appendix A. Choice of Quoting MechanismHaving recognized the need for escaping parameter values, the question is what mechanism to use? One obvious choice would be to adopt the \-escaping used for property values. However, that could not be used as-is, because it escapes a double-quote as the sequence of \ followed by double-quote. Consider what the example in Section 3.1 might look like using \-escaping:
Daboo Standards Track [Page 6]
RFC 6868 Parameter Encoding February 2013
Author's Address