Re: [Cbor] MIME tag 257 vs 36

Laurence Lundblade <> Sat, 26 September 2020 18:11 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 6AC753A0C73 for <>; Sat, 26 Sep 2020 11:11:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.894
X-Spam-Status: No, score=-1.894 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id yizNCUqs3nNq for <>; Sat, 26 Sep 2020 11:11:03 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id CB55F3A0C6D for <>; Sat, 26 Sep 2020 11:11:03 -0700 (PDT)
Received: from [] ([]) by :SMTPAUTH: with ESMTPA id MEf0kzwQUw4EOMEf1km5CX; Sat, 26 Sep 2020 11:11:03 -0700
X-CMAE-Analysis: v=2.3 cv=XM9OtjpE c=1 sm=1 tr=0 a=t2DvPg6iSvRzsOFYbaV4uQ==:117 a=t2DvPg6iSvRzsOFYbaV4uQ==:17 a=gKmFwSsBAAAA:8 a=OLC-38HLb-f0dZfM8VUA:9 a=QEXdDO2ut3YA:10 a=aTCCSWfHS9C4s2YA1nYA:9 a=R7DFt-B1VAn6xy18:21 a=_W_S_7VecoQA:10 a=nnPW6aIcBuj1ljLj_o6Q:22
From: Laurence Lundblade <>
Message-Id: <>
Content-Type: multipart/alternative; boundary="Apple-Mail=_BAC8E437-C67D-4D17-A3DC-218AD447BCB4"
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\))
Date: Sat, 26 Sep 2020 11:11:02 -0700
In-Reply-To: <>
Cc:, Jim Schaad <>
To: Carsten Bormann <>
References: <> <> <> <> <03e801d68f77$297a2800$7c6e7800$> <> <> <> <> <>
X-Mailer: Apple Mail (2.3445.104.17)
X-CMAE-Envelope: MS4wfF96uzzo8THfX3HaCjYYJ3KV4mXhULpxu4sqBH7gX1IYUI/onJ78/20Bz4v4FEu/xoIejt31n0Hh52Uh6MkptKJi2wwiRkiexsh5/cVanR3xTMqDRzS8 skyQQL6zb+E+nBzt/mHP4BDIATLoxeb++hrkV0riapFypCmBp0A/B0zxUtlow/TfGzz40eDSbp8e8ZxbNii2dOIfVR2JqDPbd4z79Z88aE4hlYpI6GVi9GJp
Archived-At: <>
Subject: Re: [Cbor] MIME tag 257 vs 36
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Sat, 26 Sep 2020 18:11:07 -0000

> On Sep 25, 2020, at 11:57 PM, Carsten Bormann <> wrote:
>> The majority of use cases and CBOR protocols using type 3 text will work with either line ending. However, some use cases or protocols may not work with either in which case translation to and/or from the local line end convention, typically that of the OS, is necessary.
> I think the important observation is that most of the limitations to one type of line ending stem from using line endings as part of the encoding/framing of a TCP-based protocol. E.g., SMTP is less tolerant of modern line endings because it needs to react to CRLF dot CRLF (unless some SMTP framing is used).  That is not a problem with CBOR-based protocols, as the framing is coming from the self-delimiting CBOR encoding, not from parsing text streams.
>> Are you proposing that CDDL be able to specify a line end convention for type 3 items?
> I think that might be useful.  Most text strings in CBOR protocols are “1-D”, i.e., they don’t employ line endings.  Where “2-D” text is intended, indicating a preference for a form of line ending, or a restriction to a form of line ending, might be useful.  Of course, restricting text content can today be done with regexes (and soon with ABNF); there is no .feature in regex/ABNF though…

I was thinking more of CBOR-based protocols that need to carry 2-D text than protocol framing like SMTP needs. Needs to work with text editors like git. A query protocol against a database that stores text that cares about the line ending. Some text-based error log recorder. The protocol designer should specify what to do. The CDDL would help.