RE: Carriage Returns
> From: Dave Korn > Sent: Friday, June 18, 2004 9:53 PM > > From: cygwin-owner On Behalf Of DePriest, Jason R. > > Sent: 18 June 2004 18:14 > > The best workaround would be to get an Amiga or Mac... they're the only > systems that use CR lineends! Hey-Hey-Hey! ;-) let's not throw thrash all over the place ;-) Very Quick Correction: The Amiga is more like *IX/*UX than you think; it uses plain LF for line endings. The "posix emulation layer" (=geekgadgets) for the Amiga had no trouble whatsoever with line endings. I believe the Mac is the only system that has (had? as of latest versions) CR-only line endings. /Hannu E K Nevalainen, B.Sc. EE - 59+16.37'N, 17+12.60'E --76--> ** on a mailing list; please keep replies on that particular list ** -- printf("LocalTime: UTC+%02d\n",(DST)? 2:1); -- --END OF MESSAGE-- -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: Carriage Returns
On Fri, Jun 18, 2004 at 01:17:07PM -0700, Chris Carlson wrote: > As defined in C, there is a concept of "end-of-line character." I was > under the impression that Perl understood this concept, too. It just so > happens that M$ doesn't have one end-of-line character, but a pair of > them. In some scripting languages, the carriage-return/line-feed pair > is considered one end-of-line character and removing one removes both. > > It would be logical to assume that a function that removes the > end-of-line character on a M$ box would remove both the carriage-return > and the line-feed. I think this is what Mr. Kramer is trying to say. Perl converts native line endings to "\n" for text files, based on platform. The problem is that cygwin doesn't have one true line ending. IIRC, Gerrit went through a lot of conniptions getting it to work well everywhere to the degree possible, but there remain cases where you need to use the PERLIO=crlf environment variable, or take other action (there are many ways) to get it working ok. If the original poster really thinks something needs to change, he'd better include cygcheck -s -r -v output as an attachment, and describe explicitly the case that is a problem. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: Carriage Returns
-Original Message- [snip] 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! -Original Message- I just have to butt in, though it's none of my business. There are many times when one wants to read a line from a file and strip carriage-returns and line-feeds. I don't know Perl like the back of my hand, but I seem to remember there is even a special feature/function that is supposed to do it. In C, I usually programmatically check for both carriage returns and line feeds and replace them with '\0'. I only do this because M$ uses both. I never had to worry about it in *nix-land. As defined in C, there is a concept of "end-of-line character." I was under the impression that Perl understood this concept, too. It just so happens that M$ doesn't have one end-of-line character, but a pair of them. In some scripting languages, the carriage-return/line-feed pair is considered one end-of-line character and removing one removes both. It would be logical to assume that a function that removes the end-of-line character on a M$ box would remove both the carriage-return and the line-feed. I think this is what Mr. Kramer is trying to say. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
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. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_[EMAIL PROTECTED] |,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: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: Carriage Returns
> -Original Message- > From: cygwin-owner On Behalf Of DePriest, Jason R. > Sent: 18 June 2004 18:14 > > Oops! You quoted the list address uncensored three times, > included a > >disallowed disclaimer, and didn't spot that no amount of cygcheck > output is > >going to give us any clue why Mr. Kramer is complaining > about the fact > that > >Cygwin uses POSIX style line-ends in a completely correct and > >standards-specified fashion... > > 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! :) > I apologize for the 'disclaimer' as it was recently added to our > corporate Exchange servers which I do not have administrative control > over. > > I use corporate-standard Outlook as my email client and I > don't know how > to make it obfuscate email addresses by default. It's a shame actually, because the two standard solutions offered to these problems (1: use a free webmail a/c for list posts, 2: use oe-quotefix) are actually incompatible with each other. I don't know a sensible way round this. Sometimes I've used OE quote-fix at work, but sent the posts out to my free webmail a/c and then fw'd them to the list from there. That's a lot of work. > I usually manually fix the email addresses, but I didn't > remember to do > it. Ya got me there, I've done it myself. > 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. -- Can't think of a witty .sigline today -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
OT (WAY) RE: Carriage Returns
Igor Pechtchanski wrote: > On Fri, 18 Jun 2004, DePriest, Jason R. wrote: > >>> -Original Message- >>> From: cygwin-owner at cygwin dot com [mailto: cygwin-owner at >>> cygwin dot com] On Behalf Of Dave Korn Sent: Friday, June 18, 2004 >>> 11:55 AM >>> To: cygwin at cygwin dot com >>> Subject: RE: Carriage Returns >>> >>>> -Original Message- >>>> From: cygwin-owner On Behalf Of DePriest, Jason R. >>> >>> >>> Oops! You quoted the list address uncensored three times, >>> included a >>> disallowed disclaimer, and didn't spot that no amount of cygcheck >>> output is going to give us any clue why Mr. Kramer is complaining >>> about >>> the fact that Cygwin uses POSIX style line-ends in a completely >>> correct >>> and standards-specified fashion... >> >> Somebody seems a bit grumpy today. > > MIT = Meanie In Training (no offense to the similarly named > institution). > >> I apologize for the 'disclaimer' as it was recently added to our >> corporate Exchange servers which I do not have administrative >> control over. >> >> I use corporate-standard Outlook as my email client and I don't know >> how to make it obfuscate email addresses by default. > > Do you Google: > <http://google.com/search?q=outlook+raw+addresses+replies>? > >> I usually manually fix the email addresses, but I didn't remember to >> do it. >> >> Also, I'm guessing nobody else gets this problem, or someone would >> have mentioned it: I get the confidentiality disclaimer appended >> *TWICE*. Exchange sticks it on once when the message goes out, and, >> since it recognized that I'm an employee, sticks another one on when >> it comes back in. > > Nasty, but I guess we have no control over bureaucratic idiocy. Just > grin and bear it. > >> I was wondering if John Kramer could try NOBINMODE in his CYGWIN >> environment variable to try to get around the issues he has. > > Actually, nobinmode just deals with pipes. I think what he might > want is actually PERLIO=crlf (a WAG based on a garbled description of > the problem in the OP's message). > Igor > -- > http://cs.nyu.edu/~pechtcha/ > |\ _,,,---,,_ [EMAIL PROTECTED] > ZZZzz /,`.-'`'-. ;-;;,_ [EMAIL PROTECTED] > |,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 I recently had a system crash and I completely forgot about Outlook-QuoteFix when I got my new system. Thanks for reminding about this great tool. I'm using it now. -Jason -- Confidentiality notice: This e-mail message, including any attachments, may contain legally privileged and/or confidential information. If you are not the intended recipient(s), or the employee or agent responsible for delivery of this message to the intended recipient(s), you are hereby notified that any dissemination, distribution, or copying of this e-mail message is strictly prohibited. If you have received this message in error, please immediately notify the sender and delete this e-mail message from your computer. == -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: Carriage Returns
On Fri, 18 Jun 2004, DePriest, Jason R. wrote: > >-Original Message- > >From: cygwin-owner at cygwin dot com [mailto: cygwin-owner at cygwin dot com] On > >Behalf Of Dave Korn > >Sent: Friday, June 18, 2004 11:55 AM > >To: cygwin at cygwin dot com > >Subject: RE: Carriage Returns > > > >> -Original Message- > >> From: cygwin-owner On Behalf Of DePriest, Jason R. > > > > > > Oops! You quoted the list address uncensored three times, included a > >disallowed disclaimer, and didn't spot that no amount of cygcheck > >output is going to give us any clue why Mr. Kramer is complaining about > >the fact that Cygwin uses POSIX style line-ends in a completely correct > >and standards-specified fashion... > > Somebody seems a bit grumpy today. MIT = Meanie In Training (no offense to the similarly named institution). > I apologize for the 'disclaimer' as it was recently added to our > corporate Exchange servers which I do not have administrative control > over. > > I use corporate-standard Outlook as my email client and I don't know how > to make it obfuscate email addresses by default. Do you Google: <http://google.com/search?q=outlook+raw+addresses+replies>? > I usually manually fix the email addresses, but I didn't remember to do > it. > > Also, I'm guessing nobody else gets this problem, or someone would have > mentioned it: I get the confidentiality disclaimer appended *TWICE*. > Exchange sticks it on once when the message goes out, and, since it > recognized that I'm an employee, sticks another one on when it comes > back in. Nasty, but I guess we have no control over bureaucratic idiocy. Just grin and bear it. > I was wondering if John Kramer could try NOBINMODE in his CYGWIN > environment variable to try to get around the issues he has. Actually, nobinmode just deals with pipes. I think what he might want is actually PERLIO=crlf (a WAG based on a garbled description of the problem in the OP's message). Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_[EMAIL PROTECTED] |,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: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: Carriage Returns
>-Original Message- >From: cygwin-owner at cygwin dot com [mailto: cygwin-owner at cygwin dot com] On Behalf Of Dave Korn >Sent: Friday, June 18, 2004 11:55 AM >To: cygwin at cygwin dot com >Subject: RE: Carriage Returns > > >> -Original Message- >> From: cygwin-owner On Behalf Of DePriest, Jason R. > > > Oops! You quoted the list address uncensored three times, included a >disallowed disclaimer, and didn't spot that no amount of cygcheck output is >going to give us any clue why Mr. Kramer is complaining about the fact that >Cygwin uses POSIX style line-ends in a completely correct and >standards-specified fashion... > > >cheers, > DaveK >-- >Can't think of a witty .sigline today > > >-- >Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple >Problem reports: http://cygwin.com/problems.html >Documentation: http://cygwin.com/docs.html >FAQ: http://cygwin.com/faq/ Somebody seems a bit grumpy today. I apologize for the 'disclaimer' as it was recently added to our corporate Exchange servers which I do not have administrative control over. I use corporate-standard Outlook as my email client and I don't know how to make it obfuscate email addresses by default. I usually manually fix the email addresses, but I didn't remember to do it. Also, I'm guessing nobody else gets this problem, or someone would have mentioned it: I get the confidentiality disclaimer appended *TWICE*. Exchange sticks it on once when the message goes out, and, since it recognized that I'm an employee, sticks another one on when it comes back in. I was wondering if John Kramer could try NOBINMODE in his CYGWIN environment variable to try to get around the issues he has. -- Confidentiality notice: This e-mail message, including any attachments, may contain legally privileged and/or confidential information. If you are not the intended recipient(s), or the employee or agent responsible for delivery of this message to the intended recipient(s), you are hereby notified that any dissemination, distribution, or copying of this e-mail message is strictly prohibited. If you have received this message in error, please immediately notify the sender and delete this e-mail message from your computer. == -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: Carriage Returns
> -Original Message- > From: cygwin-owner On Behalf Of DePriest, Jason R. Oops! You quoted the list address uncensored three times, included a disallowed disclaimer, and didn't spot that no amount of cygcheck output is going to give us any clue why Mr. Kramer is complaining about the fact that Cygwin uses POSIX style line-ends in a completely correct and standards-specified fashion... cheers, DaveK -- Can't think of a witty .sigline today -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: Carriage Returns
> -Original Message- > From: cygwin-owner On Behalf Of John Kramer > Sent: 18 June 2004 17:33 > To: cygwin > Subject: Carriage Returns > To whom it may concern: > > I have a real problem with the way that cygwin/cygwin's > version of perl > handles carriage returns (\r). No, you have a problem with Cygwin, Unix, Linux, and every other POSIX compliant system in the world. > I stripped newlines from the input, What on earth persuaded you to remove vital end-of-line characters from your UNIX-formatted text files? I mean, surely you wouldn't write a post here saying "I stripped the alphabetic characters from the input and suddenly all my text disappeared! Cygwin sux0rs!" > Eventually I > figured out that cygwin takes the carriage return > *literally*. It really > goes back to the beginning of the same line if there is no > newline. Does > that really make sense? Well of course it does. That's why it's *called* carriage return. It does exactly what it says on the tin. The reason it goes back to the beginning of the line "as if there is no newline" is because there is, indeed, no newline. You stripped them all out, remember? > Shouldn't it just treat the carriage > return as a > newline? What would be the point of having separate carriage returns and line feeds only to treat them as if they were the same thing? > I ran the same program with the (dos formatted) > input files on a > redhat linux machine. The carriage returns are completely > ignored (which > would be reasonable behavior for cygwin, too). But if you had stripped all the linefeeds out on the redhat machine, you'd still have garbled output. If it was ignoring them completely, everything would be printed as one long long line with no breaks. Then you would have written to redhat complaining? > If there are > good reasons > for the way cygwin handles carriage returns, let me know. Because that's how they work. Because that's what's conformant with POSIX. Because Cygwin is a posix-emulation layer, and if you want windows behaviour, that already came installed on your machine, and making cygwin emulate windows would be pretty pointless. > Else, I suggest > that you change this behavior for the next release. I suggest you do some research into the subject. CR and LF are two different things and it's daft to complain that they don't both do the same thing just because you personally want to have the ability to use the wrong one for a given situation! Googling for "unix vs. dos line endings" should find you something informative. cheers, DaveK -- Can't think of a witty .sigline today -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: Carriage Returns
>-Original Message- >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Kramer >Sent: Friday, June 18, 2004 11:33 AM >To: [EMAIL PROTECTED] >Subject: Carriage Returns > > >To whom it may concern: > >I have a real problem with the way that cygwin/cygwin's version of perl >handles carriage returns (\r). .. cut some stuff ... > >Thanks, >John ... cut some stuff ... >Problem reports: http://cygwin.com/problems.html Please follow the instructions here ^^^ This will allow the community to better assist you. -Jason -- Confidentiality notice: This e-mail message, including any attachments, may contain legally privileged and/or confidential information. If you are not the intended recipient(s), or the employee or agent responsible for delivery of this message to the intended recipient(s), you are hereby notified that any dissemination, distribution, or copying of this e-mail message is strictly prohibited. If you have received this message in error, please immediately notify the sender and delete this e-mail message from your computer. == -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/