SOT: converting double-spaced UNIX lines to CRLF

2003-09-27 Thread Gyrus
I've got some HTML documents that I'm converting for a new site, extracting content and re-formatting, etc. I'm use a CF script to do this.I'm not entirely certain, but I think the double-space UNIX-style lines (as per Homesite prompt when I open them) are screwing up the character position calculations I'm doing to extract content. What's the quickest way of converting all these to the usual Win(?) #Chr(13)##Chr(10)#?I'm currently trying:Chr(13)&Chr(10), "ALL")>to no avail (I found a reference on the net to UNIX double-spaced lines being 0D0D0A). I'm searching and searching, but can anyone here help out with a quick 'n' easy method?Gyrus[EMAIL PROTECTED]http://norlonto.net/gyrus/dev/PGP key available 
 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]



Re: converting double-spaced UNIX lines to CRLF

2003-09-27 Thread Jim McAtee
Doesn't UNIX use just a single linefeed as a newline character?  If you knowthere are only LFs and no CRs in the string, then:- Original Message - From: "Gyrus" <[EMAIL PROTECTED]>To: "CF-Talk" <[EMAIL PROTECTED]>Sent: Saturday, September 27, 2003 2:16 PMSubject: SOT: converting double-spaced UNIX lines to CRLF> I've got some HTML documents that I'm converting for a new site, extracting> content and re-formatting, etc. I'm use a CF script to do this.>> I'm not entirely certain, but I think the double-space UNIX-style lines (as> per Homesite prompt when I open them) are screwing up the character> position calculations I'm doing to extract content. What's the quickest way> of converting all these to the usual Win(?) #Chr(13)##Chr(10)#?>> I'm currently trying:>> > Chr(13)&Chr(10), "ALL")>>> to no avail (I found a reference on the net to UNIX double-spaced lines> being 0D0D0A). I'm searching and searching, but can anyone here help out> with a quick 'n' easy method?
 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]



Re: converting double-spaced UNIX lines to CRLF

2003-09-27 Thread Stephen Hait
One other thing - I think Mac uses the opposite of Unix - CR only. At least that's what I recall from submitted HTML forms.Regards,Stephen> Doesn't UNIX use just a single linefeed as a newline character?  If> you know there are only LFs and no CRs in the string, then:> > > > > > > > - Original Message - > From: "Gyrus" <[EMAIL PROTECTED]>> To: "CF-Talk" <[EMAIL PROTECTED]>> Sent: Saturday, September 27, 2003 2:16 PM> Subject: SOT: converting double-spaced UNIX lines to CRLF> > > > I've got some HTML documents that I'm converting for a new site,> > extracting content and re-formatting, etc. I'm use a CF script to> > do this.> >> > I'm not entirely certain, but I think the double-space UNIX-style> > lines (as per Homesite prompt when I open them) are screwing up> > the character position calculations I'm doing to extract content.> > What's the quickest way of converting all these to the usual> > Win(?) #Chr(13)##Chr(10)#?> >> > I'm currently trying:> >> > > > Chr(13)&Chr(10), "ALL")>> >> > to no avail (I found a reference on the net to UNIX double-spaced> > lines being 0D0D0A). I'm searching and searching, but can anyone> > here help out with a quick 'n' easy method?> > 
 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]



Re: converting double-spaced UNIX lines to CRLF

2003-09-27 Thread Gyrus
At 14:41 27/09/2003 -0600, you wrote:>Doesn't UNIX use just a single linefeed as a newline character?  If you know>there are only LFs and no CRs in the string, then:Yeah, all the online docs I can find have this basic info, UNIX = CR, Mac = LF, Win = CRLF.However, when I output the codes for the files I'm working with using Asc(), I found sequences of 13-13-10, which was mentioned as the UNIX "double-spaced" sequences in one reference:http://www.nylug.org/mlist/nylug-talk_mhonarc/2001-01/msg00201.htmlAnyways, I just found that the source of my problem was more to do with CFFILE. In my CF5 book (Rob's O'Reilly one), the ADDNEWLINE attribute is described like this:"If set to Yes, a newline character is added to the end of the file."This seems to be wrong - the attribute adds a newline to the end of every *line* in the file, creating something that says "Open as double-spaced or single-spaced lines" when you open in HS. Default is Yes. I explicitly set it to no and, no double-spaced lines.I think I can get back to work now, but if anyone's got any references to explain all this, I'd be interested! Also in how to get HS+ to always open double-spaced files as single-spaced, skipping the dialogue - the reg key mentioned in the above web page seems to not be there anymore.cheers,Gyrus[EMAIL PROTECTED]http://norlonto.net/gyrus/dev/PGP key available 
 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]



Re: SOT: converting double-spaced UNIX lines to CRLF

2003-09-27 Thread Dave Hodder
Gyrus wrote:> I've got some HTML documents that I'm converting for a new site, extracting> content and re-formatting, etc. I'm use a CF script to do this.> > I'm not entirely certain, but I think the double-space UNIX-style lines (as> per Homesite prompt when I open them) are screwing up the character> position calculations I'm doing to extract content. What's the quickest way> of converting all these to the usual Win(?) #Chr(13)##Chr(10)#?> > I'm currently trying:> > > Chr(13)&Chr(10), "ALL")>> > to no avail (I found a reference on the net to UNIX double-spaced lines> being 0D0D0A). I'm searching and searching, but can anyone here help out> with a quick 'n' easy method?Possibly I'm misunderstanding, but Unix usually just uses an ASCII LF for line endings, as opposed to MS Windows (CR LF) and Mac (CR).  So to go from Unix -> Windows line endings, you want to replace just Chr(13) with Chr(13)&Chr(10).Dreamweaver allows you to choose what type of line break you want when you edit a document.  If you're doing this as a one-off exercise, you could try an arbitary global search and replace to replace ""a coffee.  ;o)Regards,Dave
 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]