| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
| :list-unsubscribe:list-subscribe:list-archive:list-post | |
| :list-help:sender:subject:to:references:from:message-id:date | |
| :mime-version:in-reply-to:content-type; q=dns; s=default; b=wLi8 | |
| jVhnvtUSARH7Wpt5BEi3wq0vUtwubK0Lv/sIzZOz50s6I/zJsOCH42g4luJNqobt | |
| WTfn0HUf5NZGK2FAJbV99H9d+rKQpUkNx+HnVouVi90mk4TpY0bwgJjVabt84Tea | |
| ufyNJiwd0BkuhLCDz1RmR/SLWOzhrmq4hvqbl0M= | |
| DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
| :list-unsubscribe:list-subscribe:list-archive:list-post | |
| :list-help:sender:subject:to:references:from:message-id:date | |
| :mime-version:in-reply-to:content-type; s=default; bh=JI6oWisoEY | |
| CQH470UVPjZxo1aJY=; b=tdbnmDBDml0kHs1mnOK+7cXQCrvIrUHFHWG723Eg0D | |
| zda8xEXaNetHpEtzHegwh1gGRJcoeo4yBue4ydfyNLK/yWjYZa24OqSDXEkAH+W6 | |
| cJPyxTZI3t8IncJinFLUKTligXD8MTgh7N2gMQY17N+ypVhoKBJhaTUqRuQt3PrT | |
| 0= | |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| Authentication-Results: | sourceware.org; auth=none |
| X-Virus-Found: | No |
| X-Spam-SWARE-Status: | No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=relying, lazily, crs, states |
| X-HELO: | mx1.redhat.com |
| Subject: | Re: [ANNOUNCEMENT] Updated [test]: sed-4.4-1 |
| To: | cygwin AT cygwin DOT com |
| References: | <announce DOT fef1110c-ac22-0877-6602-ae7f0acb7e54 AT redhat DOT com> <589f97c1 DOT 1c139d0a DOT 60fe5 DOT 98e2 AT mx DOT google DOT com> <20170212113222 DOT GF11666 AT calimero DOT vinschen DOT de> |
| From: | Eric Blake <eblake AT redhat DOT com> |
| Openpgp: | url=http://people.redhat.com/eblake/eblake.gpg |
| Message-ID: | <5f509f48-5da7-45f8-fc9e-edc8e541724c@redhat.com> |
| Date: | Mon, 13 Feb 2017 13:15:18 -0600 |
| User-Agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
| MIME-Version: | 1.0 |
| In-Reply-To: | <20170212113222.GF11666@calimero.vinschen.de> |
| X-IsSubscribed: | yes |
--wsoBm5X7OQIIGi7dbAxVjpKBQ88L2WQOv
Content-Type: multipart/mixed; boundary="o5OT4E4iUdITFk6CBWgcUrVQoH5sXvI28";
protected-headers="v1"
From: Eric Blake <eblake AT redhat DOT com>
To: cygwin AT cygwin DOT com
Message-ID: <5f509f48-5da7-45f8-fc9e-edc8e541724c AT redhat DOT com>
Subject: Re: [ANNOUNCEMENT] Updated [test]: sed-4.4-1
References: <announce DOT fef1110c-ac22-0877-6602-ae7f0acb7e54 AT redhat DOT com>
<589f97c1 DOT 1c139d0a DOT 60fe5 DOT 98e2 AT mx DOT google DOT com>
<20170212113222 DOT GF11666 AT calimero DOT vinschen DOT de>
In-Reply-To: <20170212113222 DOT GF11666 AT calimero DOT vinschen DOT de>
--o5OT4E4iUdITFk6CBWgcUrVQoH5sXvI28
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
On 02/12/2017 05:32 AM, Corinna Vinschen wrote:
> I understand the desire but it's s a pretty tricky problem. awk is
> used to manipulate text input in the first place so it treats all
> input, files as well as stdin, as text. So, shall we drop this
> behaviour for files only? Or for stdin as well? How many existing
> setups are bound to fail after a change?
I think part of the confusion is that POSIX states that awk behavior is
only well-defined on "text files" - but that is the POSIX definition of
a text file (no invalid characters in multibyte encoding, no over-long
lines, no NUL bytes, trailing newline), and not strictly related to the
Windows definition of text file (one with CRLF line endings). But
remember, just because POSIX says that awk is only required to be
well-behaved on text files does not mean that awk cannot be usefully
used on non-text files, and anything we do that silently converts binary
data into corrupted text, when a binary mount was requested, gets in the
way of that usage pattern.
As long as we aren't using fopen("rb") to force binary mode, but rather
just fopen("r") to let the mount mode rule, we should be okay for any
file that we open. As for stdin, ideally stdin is either from a file
(where the shell opened it according to mount mode) or from a pipeline
(where presumably the other end of the pipe opened the file in the
correct mount mode, or where the user can inject a d2u into the pipeline
if they want CR stripped).
Yes, it means that any existing users that were lazily relying on the
forced text mode to automatically strip CRs will now have to fix their
scripts to add a d2u invocation, but I already hit some of that fallout
when I changed bash to quit forcing text mode.
--=20
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
--o5OT4E4iUdITFk6CBWgcUrVQoH5sXvI28--
--wsoBm5X7OQIIGi7dbAxVjpKBQ88L2WQOv
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBCAAGBQJYogXGAAoJEKeha0olJ0Nqm/EH/i+MXCfZsnkq9yIIr4MU5vWO
EV7i9GZ8+fQwLLw5EpZ4h0YQo82rHPmPPLZYmiYyMbVYxAMyCs+yZas0nnbJmX/B
BFjomw8+fJeY3hKyGOKhky0QT3QHYXNqVBo+UUNUbyac8Sm4iIfDwazmnMOI9kmY
w0hK3mN559jIFPv4saK63ZTJBytiIQsH5Ll/iwqeBbkKsTqV+u6WdKjVrtHOpUsT
C9lwTtu2IsCVEry+s/JlN0t8NrLpav4eCuDKgErvOdTzMOJRgXtO/jHqedmCiBEv
x/6tG9XVnVH611Xn622v3bA+PZv+sJy/SFpRDxS0/4gyJGFq5YwsNAJvPUXxbqk=
=29+l
-----END PGP SIGNATURE-----
--wsoBm5X7OQIIGi7dbAxVjpKBQ88L2WQOv--
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |