Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] When is a line feed really a line feed?
- Date: Fri, 03 Dec 2010 11:18:34 -0700
- From: "David J Iannucci" <jlinux@example.com>
- Subject: Re: [tlug] When is a line feed really a line feed?
- References: <4CF92E9D.3020004@example.com>
On Sat, 04 Dec 2010 02:53 +0900, "Dave M G" <dave@example.com> wrote: > So, is there a sure fire way I can set up my CSV file so that it is > using \n for new lines? Like, rock solid sure so that either it works, > or if it doesn't I can say confidently to the other guy that the > problem might be his end? Dave, I'm no authority on this stuff, but I think that \n doesn't refer to an actual character... I think it is an abstraction referring to whatever is the line terminator used by the OS at hand (making the other guy's statement somewhat tautological :-) The actual characters are CR (ASCII 13) and LF (ASCII 10). UNIX/Linux, of course, uses LF as \n, Mac uses only CR, and DOS/Windows uses CRLF. I use the following tidbit to see what actually exists as \n in a text file: $ perl -ne 's/\015/<CR>/g; s/\012/<LF>/g; print "$_\n";' <filename> This converts CR and LF to visible form. You could use a similarly simple program in Perl^H^H^H^Hyour favorite dynamic language to convert the line terminators in your CSV file. HTH, Dave
- Follow-Ups:
- Re: [tlug] When is a line feed really a line feed?
- From: Marjan Parsa
- Re: [tlug] When is a line feed really a line feed?
- From: Stephen J. Turnbull
- Re: [tlug] When is a line feed really a line feed?
- From: Edmund Edgar
- References:
- [tlug] When is a line feed really a line feed?
- From: Dave M G
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] When is a line feed really a line feed?
- Next by Date: Re: [tlug] When is a line feed really a line feed?
- Previous by thread: Re: [tlug] When is a line feed really a line feed?
- Next by thread: Re: [tlug] When is a line feed really a line feed?
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links