Web lists-archives.com

Re: 2.10.0: Cygwin now can not work well with a file in dos format.

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