Re: [netmod] Where can I use <CODE BEGINS> <CODE ENDS> ? - rfcstrip

Erik Auerswald <auerswal@unix-ag.uni-kl.de> Tue, 31 March 2020 09:18 UTC

Return-Path: <auerswal@unix-ag.uni-kl.de>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1220F3A1DBE for <netmod@ietfa.amsl.com>; Tue, 31 Mar 2020 02:18:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.004
X-Spam-Level:
X-Spam-Status: No, score=0.004 tagged_above=-999 required=5 tests=[MAY_BE_FORGED=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=unavailable autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cG6P3usL8YRy for <netmod@ietfa.amsl.com>; Tue, 31 Mar 2020 02:18:38 -0700 (PDT)
Received: from mailgw1.uni-kl.de (mailgw1.uni-kl.de [IPv6:2001:638:208:120::220]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3A7513A10EA for <netmod@ietf.org>; Tue, 31 Mar 2020 02:18:38 -0700 (PDT)
Received: from [172.20.10.2] (x2e720675.dyn.telefonica.de [46.114.6.117] (may be forged)) (authenticated bits=0) by mailgw1.uni-kl.de (8.14.4/8.14.4/Debian-8+deb8u2) with ESMTP id 02V9IJv9101011 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 31 Mar 2020 11:18:31 +0200
To: Balázs Lengyel <balazs.lengyel=40ericsson.com@dmarc.ietf.org>, Kent Watsen <kent+ietf@watsen.net>
Cc: "netmod@ietf.org" <netmod@ietf.org>
References: <DB7PR07MB4011BBD7854EE286A76CAB28F0CB0@DB7PR07MB4011.eurprd07.prod.outlook.com>
From: Erik Auerswald <auerswal@unix-ag.uni-kl.de>
Message-ID: <6c432679-7950-763e-74b3-d493f966d97d@unix-ag.uni-kl.de>
Date: Tue, 31 Mar 2020 11:18:18 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1
MIME-Version: 1.0
In-Reply-To: <DB7PR07MB4011BBD7854EE286A76CAB28F0CB0@DB7PR07MB4011.eurprd07.prod.outlook.com>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Language: en-GB
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/Tb7_7EcyHSH1N36IpP-09mDpMjI>
Subject: Re: [netmod] Where can I use <CODE BEGINS> <CODE ENDS> ? - rfcstrip
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 31 Mar 2020 09:18:40 -0000

Hi,

On 30.03.20 18:10, Balázs Lengyel wrote:
 > From: Kent Watsen <kent+ietf@watsen.net>
 > > [...]
 > > All The extracted files (including the two that are NOT folded)
 > > contain a ‘^@‘ character at the EOF.   This must be something
 > > introduced by `rfcstrip` because `rfcfold` does a simple file-level
 > > copy when unfolding isn't needed.
> [...]
> I do not see the additional ^@ at EOF.  I tested it on cygwin, which is mostly GNU compatible.
> 
> This is how my file ends
> 
> 3c 2f 69 6e 73 74 61 6e 63 65 2d 64 61 74 61 2d 73 65 74 3e 00 ---- </instance-data-set>

This shows a NUL byte at the end.  In "cat -A" output a NUL byte is
shown as "^@":

     $ printf -- '%s' 3c 2f 69 6e 73 74 61 6e 63 65 2d 64 61 74 61 2d \
                      73 65 74 3e 00 | xxd -r -p | cat -A
</instance-data-set>^@

Your use of "grep -z" shows that NUL bytes are used as line endings
instead of NL bytes ("Line Feed" character, '\n').

I did not look into this further since Martin seems to be working on an
alternate implementation.

Thanks,
Erik