delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/02/27/05:13:54

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:mime-version:in-reply-to:references:from:date
:message-id:subject:to:content-type; q=dns; s=default; b=RkJA7AO
HXHsLxDv6CJSB8yWLWPeNdaYCPu9rz0aUKr7T35SgZvGa7GGznTPfuKqWGAkZxD8
KnDpwv5CAfkQ9hjbQJmYkNAmDB4652dtsk8R8CC8Bh+DTtCWO6rCca0X9zhJwhvZ
XutrLZhFYuYUjcvEMMNfaU2dm4SajphnOios=
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:mime-version:in-reply-to:references:from:date
:message-id:subject:to:content-type; s=default; bh=1pMKvZyLheMDX
H14FcAPkTLtgG8=; b=OiZ8WoP0kXazjR6teGUIjujBlcCOk035V1Cu4W8ZIRYDu
VyQSIyp/no/FhReLhuoIDTM6J98LUFxB/SoooGp/aA0uW8MQ7am564rO3leoiIOc
uXrkxL+t2HhxutVeMY5GX9OHhfkbGVf/XqYrbwIs3CSLxkssoRnhgazIq5sH5c=
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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=D*ru, states
X-HELO: mail-vk0-f47.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=FbHGNoB0q3BtzjhZvBvQm2Ez1BXpTe9EIJUoYX1UyO0=; b=iBUvOB9Ye0g51AT1vDmZ7iJ+ZsdimX9LJtKuE6EuQpdvK9AoKiTvY+4Fr2cffqp0XZ 2180UdDqw38wZyfuKG+mkLN7fnj4IlLyHjjsVjwxsAexyND8nzV11uBsuLwUWIGNJeTh o47kOmtLVw3DDL/odhl+BzJimgDlsR1sZROX6YV/KT0Ocm/ARWY4Bgn6X5fWiSpD2WCF ZgNCT+h8ct33jkzgumsnl24dhl7bKmhAUXvvhkcs4jCE0qPn+IRhcKkhRG8dX/JIwp1a 7dA6Do0wkdvkb9lMwoOBnxRZhEw21uGk+1raturiV+dKOCC8p5FoU9ZiGFo4deYfg3QJ ZJAQ==
X-Gm-Message-State: APf1xPB5Q8pHI9lZkd11vNv2d3y3a966YZ9H8AFkHFIsdMy8iPTcEsE4 kjexj5yMcRMYfcXy7P5xGtmpTKHRUrN693B0E9RyiA==
X-Google-Smtp-Source: AG47ELuCWBZr3LTAs4sZAfgziVIlS9V3bcA5s9FEPkawPc/jgvBg6fm96hYolakX3DfgoBSlk6c6Y3M3bqnoOvtKPxs=
X-Received: by 10.31.185.2 with SMTP id j2mr10026694vkf.52.1519726417430; Tue, 27 Feb 2018 02:13:37 -0800 (PST)
MIME-Version: 1.0
In-Reply-To: <1354080997.20180227124807@yandex.ru>
References: <CAGHpTB+bfbts=fOBSQPN7c-NDh8FTXR+EauhDhiVrqbgawcYoA AT mail DOT gmail DOT com> <1354080997 DOT 20180227124807 AT yandex DOT ru>
From: Orgad Shaneh <orgads AT gmail DOT com>
Date: Tue, 27 Feb 2018 12:13:37 +0200
Message-ID: <CAGHpTBKhX-hya1QvjnGsqgT+dLpe6cx1kNRi61NpYm467MDkzQ@mail.gmail.com>
Subject: Re: gawk Regression: CR characters are not stripped on Windows
To: cygwin AT cygwin DOT com

On Tue, Feb 27, 2018 at 11:48 AM, Andrey Repin <anrdaemon AT yandex DOT ru> wrote:
> Greetings, Orgad Shaneh!
>
>> 1. The gawk info page states that:
>
>>> Under MS-Windows,
> ------------^^^^^^^
>>> 'gawk' (and many other text programs) silently
>>> translates end-of-line '\r\n' to '\n' on input and '\n' to '\r\n' on
>>> output.
>
>> and on Feb 8 the following section was added:
>
>>> Recent versions of Cygwin open all files in binary mode.  This means
>>> that you should use 'RS = "\r?\n"' in order to be able to handle
>>> standard MS-Windows text files with carriage-return plus line-feed line
>>> endings.
>
>> This breaks compatibility between different gawk versions. What were
>> the reasons for this change in cygwin, and why was it pushed upstream?
>
>> 2. Git and other tools automatically convert text files to CRLF on
>> Windows.
> --^^^^^^^
>
> Cygwin is not "Windows", it is "sort of Linux".
> Besides, this kind silent mangling is dangerous to an unsuspecting user.

I see. This is however not true for MSYS2.

Then I guess we will just keep this as a patch for MSYS2, which is
already merged[1]?

[1] https://github.com/Alexpux/MSYS2-packages/commit/c81d882b9838f8245603c7a8d5f8845eeadd6c2a

- Orgad

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019