Stripping CRLF from incoming html files

Sannyasin Sivakatirswami katir at hindu.org
Wed Nov 10 13:27:49 EST 2004


Thanks for the input... I'll try it, but I found another solution...
well, not exactly a solution, but a work around.

the input data was originally input with

put url "http:/www.someDomain.com/aBook/verse1.html" into fld "text"
create card
put url "http:/www.someDomain.com/aBook/verse2.html" into fld "text"
create card

etc on a repeat loop. i.e. downloaded directly off the net with http.

But, if I wrote out the data to a file on OSX, and read it back in...

put fld "text" into url "file:/Users/katir/Desktop/temp.txt"
put url "file:/Users/katir/Desktop/temp.txt" into fld "text"

all my problems went away!? In fact some other invisible garbage was 
cleaned out in addition to the CRLF's... go figure...

Though the underlying issues remain mysterious,
it was faster than spending more time
testing scripting solutions.
Another great thing about Revolution.
There are a dozen ways to get the job done today.

Thanks

Sivakatirswami



On Nov 9, 2004, at 8:37 PM, Yves COPPE wrote:

>
> Le 10 nov. 04, à 05:05, Dar Scott a écrit :
>
>>
>> On Nov 9, 2004, at 8:55 PM, Sannyasin Sivakatirswami wrote:
>>
>>> I tried
>>>
>>> replace CRLF with numToChar(10)
>>>
>>> but it didn't work
>>>
>>> I tried
>>>
>>> replace numToChar(13) with ""  in tInputData
>>>
>>> it also didn't work
>>>
>>> I'm missing something really simple here.
>>
>> Try this
>>
>>      replace CRLF with LF  -- same effect as your second one above
>>
>> That will remove all numToChar(13).
>>
>> Then do this several times
>>
>>      replace (LF & LF) with LF
>>
>>
>> That will get rid of extra lines, leaving only one line.  (I assume 
>> you want the one line.)
>>
>> Dar
>>
>>
>
>
> Try this :
>
> filter tInputData with "*?"
>
> Greetings.
>
> Yves COPPE
> yvescoppe at skynet.be
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the use-livecode mailing list