delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/06/16/16:25:45

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
:content-transfer-encoding; q=dns; s=default; b=CNeh0ZEsBfseNcqA
zWANzvpplb5P8dJMah8n+G+aoMaJMAov9HYV9cLpzY4ltWkGiZ0eO+mBLugtUaL6
UwRx0lo4bH2zTuWtKSQlr7H3mqcMcCe8OMjd0eLiDWAqS3t9fHVu8EYGjtWLRE1Z
1sNF/BaFsZRIRQFEr11QifEejrI=
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
:content-transfer-encoding; s=default; bh=Vh0Y1eUvnKV/B1iwdRWBVD
LNevY=; b=nzKibwQIZdaawJr412kioF6xb30Wp30b9jyiEJAKs6vSEw6lJ6psr9
gWrtwmixJ5jIl9SEWl9Y9ERAoObYS9YiIubQNI9lZItx+BWk7Rznkh9CfHgVEkc7
0jvymF0jm038XDGqBPcaexF/oa8O3mTq7m49EBzN2go4DKHfPKCEM=
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=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
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)
Subject: Re: 2.10.0: Cygwin now can not work well with a file in dos format.
To: cygwin AT cygwin DOT com
References: <2bfeabde DOT 39a8 DOT 16403e31153 DOT Coremail DOT tuyanyi AT 163 DOT com> <0F7D3B1B3C4B894D824F5B822E3E5A177880092C AT IRSMSX102 DOT ger DOT corp DOT intel DOT com> <003101d40572$dcd479f0$967d6dd0$@rogers.com> <0F7D3B1B3C4B894D824F5B822E3E5A17788014D3 AT IRSMSX102 DOT ger DOT corp DOT intel DOT com>
From: cyg Simple <cygsimple AT gmail DOT com>
Openpgp: preference=signencrypt
Message-ID: <1af5d7f7-4b57-0ac7-e9a8-1ccda9e47071@gmail.com>
Date: Sat, 16 Jun 2018 16:25:00 -0400
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>
X-IsSubscribed: yes

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

- Raw text -


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