Re: [VCARDDAV] Progressing draft-daboo-ical-vcard-parameter-encoding-01

Michael Angstadt <mike.angstadt@gmail.com> Mon, 24 September 2012 18:21 UTC

Return-Path: <mike.angstadt@gmail.com>
X-Original-To: vcarddav@ietfa.amsl.com
Delivered-To: vcarddav@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id ACB2E21F882D; Mon, 24 Sep 2012 11:21:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.603
X-Spam-Level:
X-Spam-Status: No, score=-2.603 tagged_above=-999 required=5 tests=[AWL=-0.493, BAYES_05=-1.11, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id o0oEwHHQWd0t; Mon, 24 Sep 2012 11:21:12 -0700 (PDT)
Received: from mail-oa0-f44.google.com (mail-oa0-f44.google.com [209.85.219.44]) by ietfa.amsl.com (Postfix) with ESMTP id E3A1821F8698; Mon, 24 Sep 2012 11:21:11 -0700 (PDT)
Received: by oagn5 with SMTP id n5so5874544oag.31 for <multiple recipients>; Mon, 24 Sep 2012 11:21:10 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=e8DpZaMtPyUMFWg/tf+/Qtdg2ruqKgM6ggHUXBT64Fc=; b=s1hHE4srgoTaMO4SWjk1Umihd3X5Ev2c6ou8zRTO1kTbRBH7AZA/YGnNILPhaUFJTY VN6rkhaHOwkK4qNl9uOBd4hlxTwa3VTrB2GU4V4r0rCccmByggG+CBPs6QaSbTP1kjMl 3L2MFblb9swS5PBU5PNwR+AmMZ0jttft4ezKpocUa3+UduQC0DkFKqRMG7lkQhvztvnM hE9QsB32LBpU16v9Q6EXeIJFLc5VibcwB4oO+ejgXmG9kPBrDrM14jHgP2Wc16Rf9b2d U48QI38bgTktWqoPtje0+GTwo1acr9Aud7aB5itFJF7BCFIC9FmetaBAcc9juLyLAxlb ox5Q==
MIME-Version: 1.0
Received: by 10.60.11.162 with SMTP id r2mr2469416oeb.114.1348510870251; Mon, 24 Sep 2012 11:21:10 -0700 (PDT)
Received: by 10.60.136.228 with HTTP; Mon, 24 Sep 2012 11:21:09 -0700 (PDT)
In-Reply-To: <B03910A968E54A0AA20AE53F@caldav.corp.apple.com>
References: <55E88FFC6AD66C7A53D6EE17@caldav.corp.apple.com> <CAJNb_g25owWPY3qmLUarCLmRdLFa2POFYZaEPVPYnfw+-7UoCw@mail.gmail.com> <B03910A968E54A0AA20AE53F@caldav.corp.apple.com>
Date: Mon, 24 Sep 2012 14:21:09 -0400
Message-ID: <CAJNb_g2TiMeMCZOKV=ezpSwqH8aa-vSCq=OzS2zCzRjpg9HDjA@mail.gmail.com>
From: Michael Angstadt <mike.angstadt@gmail.com>
To: Cyrus Daboo <cyrus@daboo.name>
Content-Type: text/plain; charset="ISO-8859-1"
Cc: Calsify <calsify@ietf.org>, CardDAV <vcarddav@ietf.org>
Subject: Re: [VCARDDAV] Progressing draft-daboo-ical-vcard-parameter-encoding-01
X-BeenThere: vcarddav@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: IETF vcarddav wg mailing list <vcarddav.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/vcarddav>, <mailto:vcarddav-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/vcarddav>
List-Post: <mailto:vcarddav@ietf.org>
List-Help: <mailto:vcarddav-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/vcarddav>, <mailto:vcarddav-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 24 Sep 2012 18:21:12 -0000

Cyrus,

> BTW the ABNF comment in 6350 for QSAFE-CHAR and SAFE-CHAR is (approximately):
>
>    ; Any character except CTLs, DQUOTE, ...
>
> CTL is defined in ABNF as:
>
> CTL            =  %x00-1F / %x7F
>
> So technically that would exclude HTAB - i.e. the comment is not accurate, though the actual definition is.

Yeah, that's a error.  It's noted in the 6350 errata.

> Using a double-quote in the escape sequence won't work. Consider (example from the spec):
>
> ATTENDEE;CN="George Herman \"Babe\" Ruth":mailto:babe@example.com
>
> Existing iCalendar/vCard parsers know nothing about escape sequences in parameters.

Oh ok, that makes sense.

-Mike
http://code.google.com/p/ez-vcard

On Fri, Sep 21, 2012 at 12:20 PM, Cyrus Daboo <cyrus@daboo.name> wrote:
> Hi Michael,
> Thanks for your comments:
>
>
> --On September 21, 2012 11:56:12 AM -0400 Michael Angstadt
> <mike.angstadt@gmail.com> wrote:
>
>> An escape sequence for the horizontal tab character is actually not
>> necessary.  Horizontal tab characters can be included in a parameter
>> value without needing to be escaped.  The ABNF definitions for
>> parameter values (in both the iCalendar and vCard specs) allow for
>> "WSP".  "WSP" is defined as being a space or horizontal tab character
>> (see RFC 5234 p.14).
>
>
> Yes, you are correct. I will remove HTAB escaping from the spec.
>
> BTW the ABNF comment in 6350 for QSAFE-CHAR and SAFE-CHAR is
> (approximately):
>
>     ; Any character except CTLs, DQUOTE, ...
>
> CTL is defined in ABNF as:
>
> CTL            =  %x00-1F / %x7F
>
> So technically that would exclude HTAB - i.e. the comment is not accurate,
> though the actual definition is.
>
> In 5545 the comment is:
>
> ; Any character except CONTROL, DQUOTE, ...
>
> And 5545 defines CONTROL itself:
>
> CONTROL       = %x00-08 / %x0A-1F / %x7F
>
> That explicitly excludes HTAB. So 5545 comment is correct.
>
>
>> Why not use the conventional backslash character for escaping?  The
>> vCard specs already state that the LABEL parameter of the ADR property
>> should use the "\n" sequence to escape newlines (RFC 6350 p.33-34).
>>
>> So, the escape sequences could instead be:
>>
>> +---------------------+-------------------------------+
>> | Escape Sequence     | Character                     |
>> +---------------------+-------------------------------+
>> | \" (U+002F, U+0022) | U+0022 (Quotation Mark)       |
>> | \n (U+002F, U+006E) | U+000A (Line Feed)            |
>> | \\ (U+002F, U+002F) | U+002F (Backslash)            |
>> +---------------------+-------------------------------+
>
>
> Using a double-quote in the escape sequence won't work. Consider (example
> from the spec):
>
> ATTENDEE;CN="George Herman \"Babe\" Ruth":mailto:babe@example.com
>
> Existing iCalendar/vCard parsers know nothing about escape sequences in
> parameters. So they will parse the parameter value as  'George Herman \' -
> i.e. from the first occurrence of " to the second occurrence. However, the
> text after the second double-quote ought to be either a : or a ; but is not
> - so the parser could legitimately throw an error at that point because the
> data is invalid.
>
> Bottom line is a double-quote cannot be escaped using a sequence that itself
> includes a double-quote for backwards compatibility reasons. Hence the
> choice of using single-quote in the spec.
>
> In terms of the choice to not use \ - I have seen some non-interoperable use
> of \ in parameters, and thus want to steer clear of that so that we can
> achieve guaranteed, reliable interoperability. Also, given that double-quote
> gets changed to single-quote in the escape sequence for a parameter, but not
> for a value, I did not want to give the impression that the same escape
> mechanism can be used for both (which could lead to other issues such as an
> implementation incorrectly escaping a ; as \; as opposed to quoting the
> parameter value).
>
> BTW Barry Lieba, who agreed to sponsor this document as AD, asked similar
> questions and we agreed that it would be good to include justification of
> the choices, as per above, as an appendix in the draft and I intend to add
> that once the informal last call is over.
>
> --
> Cyrus Daboo
>