John Cowan wrote: > Bob Proulx scripsit: > > You must be running a port of the GNU ptx to a MS platform. > > In this particular case, the subject line shows that the port in > question is Cygwin,
Ah, yes, I see that now. Thanks for pointing that out. I had missed seeing that there. > but this is not a Cygwin-specific issue. In this case it looks like it would be though since AFAIK cygwin should open that file in text mode and therefore the CR-NL endings should have been handled automatically. But if the file were opened in binary mode then the behavior as described would be true. So on first pass this would appear to be a simple issue of opening that particular file with the opposite MS file type from what it needed. I think that if the file were opened in text mode then the CR would be stripped automatically and this problem would be avoided. But I am not familiar with the internals of cygwin and so will leave that to others. > The Windows line-ending convention is now all over the place. With > file services like NFS, AFS, and CIFS, it's not uncommon for non-MS > systems to have to process MS text files (and indeed vice versa; > many though not all native MS text tools now cope with Unix-style > line endings). Don't forget Mac line endings either then. But when working cross-platform it is often necessary to transcode files from one type of system to another. There are many sets of utilities that provide this capability such as dos2unix and fromdos and so forth. > Line-ending bugs ought not to be rejected out of hand any more. Hmm... There must be some history here of which I am not aware. Am I treading through a minefield? Even though this is not an upstream bug I tried not to sound dismissive. It obviously would be a problem. But it needs to be fixed in the right place. Bob _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
