From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 48412 invoked by alias); 16 Jun 2018 20:25:35 -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 48241 invoked by uid 89); 16 Jun 2018 20:25:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=ending, brain, txt, highly X-HELO: mail-io0-f169.google.com Received: from mail-io0-f169.google.com (HELO mail-io0-f169.google.com) (209.85.223.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 16 Jun 2018 20:25:21 +0000 Received: by mail-io0-f169.google.com with SMTP id g22-v6so13625400iob.7 for ; Sat, 16 Jun 2018 13:25:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=6KVFdeaYDMuVqT5LBSM8MOCNDgdjXbHYUObGjzOlD8w=; b=h6LCXJd+1ZAHHDUVDzI/pU8hPJXQhI9Rhm0QUrbEjo4DCdMRtC2dqi1aM3971KcX00 Xskc33fycqXJOgQwG4cO8g12NQIz2PGkuRcwWLfQZT2MZeGQBqnm6GTgLueEkuECuy96 aA4MIKFwe5n/ZapqlbcrCT0LnslVwPYt55Vs5Bi/nrerUBxF2REjnWD8KD0sAqsTk/tC jQRmAlSBELYZbfeUGtHFO8PPT8csYz/guCdIYDRVOKfOQPPMipFeTuclqXSi9lQ6XQmb MuWXp+GIHMcvQSSjzcN/pyJiEy06QXcXG5RFPH/Kk5a+kcBP0rTdKlIX1LsvMmfEgVWa njJA== X-Gm-Message-State: APt69E3FHsaL4WPoi5qhzulr0+QL69kJTcteDDnKswywWh4mcihgkyyd ML7bhfXOaMg9v0cUjNI+Onm5YQ== X-Google-Smtp-Source: ADUXVKIYKzzStAcC+EvAn6+DBe4RWGE2ZoS61dmcQqttBEgKbU2hjvSSI8gU4F6aj85gr2pmcw7i9g== X-Received: by 2002:a6b:e411:: with SMTP id u17-v6mr5496145iog.202.1529180719671; Sat, 16 Jun 2018 13:25:19 -0700 (PDT) Received: from [192.168.0.19] ([50.4.50.42]) by smtp.gmail.com with ESMTPSA id f3-v6sm4045483iob.49.2018.06.16.13.25.14 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 16 Jun 2018 13:25:19 -0700 (PDT) Subject: Re: 2.10.0: Cygwin now can not work well with a file in dos format. To: cygwin@cygwin.com References: <2bfeabde.39a8.16403e31153.Coremail.tuyanyi@163.com> <0F7D3B1B3C4B894D824F5B822E3E5A177880092C@IRSMSX102.ger.corp.intel.com> <003101d40572$dcd479f0$967d6dd0$@rogers.com> <0F7D3B1B3C4B894D824F5B822E3E5A17788014D3@IRSMSX102.ger.corp.intel.com> From: cyg Simple Openpgp: preference=signencrypt Message-ID: <1af5d7f7-4b57-0ac7-e9a8-1ccda9e47071@gmail.com> Date: Sun, 17 Jun 2018 01:13:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <0F7D3B1B3C4B894D824F5B822E3E5A17788014D3@IRSMSX102.ger.corp.intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2018-06/txt/msg00199.txt.bz2 On 6/16/2018 10:10 AM, Soegtrop, Michael wrote: > > I haven't tried it but according to the release note above this depends on the mount type. It might help to mount your Windows text files in a mount with the text flag set. Binary files should still work on such mounts - as far as I can tell this mount flag has the effect that the binary / text flag to e.g. fopen makes a difference. If you have success with this, I would be interested to learn about it. > This only affects files on disk. Pipes are still binary mode. So depending on how the data is received by awk, sed, etc you may still receive CRLF instead of the CR removed. If the application opens the file directly then it should work to use the text mount option. I would caution though that this causes a need-to-know issue and can cause headaches if the one using the data doesn't know. I highly suggest not to use this option and to use the appropriate filters to handle CRLF. NOTE: This issue exists for all files on Linux as well as you don't know when you'll have a file with CRLF that needs to be processed. You're better off filtering all text files with appropriate tools before processing them. Only when ending the file with .txt extension should the file contain CRLF before sending it back to a user just because of the brain dead MS Notepad that opens the file in binary mode and expects the file to contain the control characters to move the cursor left and down. -- cyg Simple -- 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