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:
>
> <cfset oldContent = REReplace(oldContent, Chr(13)&Chr(13)&Chr(10),
> 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 "<html" with
"<html" and let it worry about the line breaks whilst you make yourself
a coffee.  ;o)

Regards,

Dave

[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to