From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 77388 invoked by alias); 27 Feb 2018 10:13:41 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 76729 invoked by uid 89); 27 Feb 2018 10:13:41 -0000 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 Received: from mail-vk0-f47.google.com (HELO mail-vk0-f47.google.com) (209.85.213.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 27 Feb 2018 10:13:39 +0000 Received: by mail-vk0-f47.google.com with SMTP id z130so4745380vkd.0 for ; Tue, 27 Feb 2018 02:13:39 -0800 (PST) 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 Received: by 10.176.3.115 with HTTP; Tue, 27 Feb 2018 02:13:37 -0800 (PST) In-Reply-To: <1354080997.20180227124807@yandex.ru> References: <1354080997.20180227124807@yandex.ru> From: Orgad Shaneh Date: Tue, 27 Feb 2018 10:13:00 -0000 Message-ID: Subject: Re: gawk Regression: CR characters are not stripped on Windows To: cygwin@cygwin.com Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2018-02/txt/msg00284.txt.bz2 On Tue, Feb 27, 2018 at 11:48 AM, Andrey Repin 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