This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Carriage Returns

On Fri, 18 Jun 2004, Dave Korn wrote:

> > -----Original Message-----
> > From: cygwin-owner On Behalf Of DePriest, Jason R.
> > Sent: 18 June 2004 18:14
> >
> > Somebody seems a bit grumpy today.
> Umm well maybe I guess, but I hope you noticed I didn't swear, flame,
> kook-call or otherwise exceed the WHO-specified maximum levels of sarcasm
> permitted in the environment! :)

Umm, are these guidelines actually published somewhere? ;-)

> [snip]
> > I was wondering if John Kramer could try NOBINMODE in his CYGWIN
> > environment variable to try to get around the issues he has.
> I just really, really, *really* don't think that _anything_ is going to work
> around the issue that if you strip all the newlines from a CRLF terminated
> file[+], what you end up with is something that won't be any good for either
> 'doze ~OR~ *nix!
> Apart from maybe _not_ stripping all the newlines, perhaps?
> The best workaround would be to get an Amiga or Mac... they're the only
> systems that use CR lineends!
>     cheers,
>       DaveK
> [+] or even an LF terminated file, for that matter.

Dave, I think you may have misunderstood the problem.  The files are fine,
and have both CRs and LFs in them.  The OP stripped the NLs from the lines
as they were read from the files (using chomp(), at a guess).  The problem
is that it left the CRs intact, which messed up the output.  I think if
PERLIO=crlf is used, the the CRLF sequences in the input files will be
converted into newlines by perl, so chomp() will work as expected.
      |\      _,,,---,,_
ZZZzz /,`.-'`'    -.  ;-;;,_
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]