Re-2: Removing CRLF from text

Martin Baxter mb.userev at harbourhosting.co.uk
Fri Aug 8 02:57:26 EDT 2008


Kay C Lan wrote:
> On Thu, Aug 7, 2008 at 11:34 PM, Ken Ray <kray at sonsothunder.com> wrote:
> 
>> Actually IIRC, it's done this way to standardize *internal* interpretation
>> on all the platforms (much like Rev standardizes on forward slash for path
>> delimiters). That way, regardless of whether the host OS uses LF only, CR
>> only or CRLF, when text data is read in from the outside it is all
>> converted
>> internally to use the LF character (ASCII 10). If you want to read in the
>> actual end-of-line (EOL) delimiters, you can read the file in *as binary*:
>>
> 
> Might then that explain why Mark Stuart could only get the 'binfile' version
> of a solution to work.
> 
> Sarah and Jacque told him to replace  "+" & CRLF with "", but if what you
> say is correct, then Rev has already removed CRLFs, no such combo should
> exist?
> 

That's correct.

> Mark, although you seem to have got a solution with binfile, does it work
> with 'file' but just replacing "+" & LF ?
> 

That is an alternative approach that should also work.

Martin Baxter

-- 
I am Not a Number, I am a free NaN



More information about the use-livecode mailing list