When is 10 really 13?

Björnke von Gierke bvg at mac.com
Thu Dec 5 09:12:57 EST 2013


Instead of opening the file as text, open it as binary. Make sure to watch out for mactoiso() and isotomac() too.

put url ("binfile:" & myPath) into field 1 --load text unchanged
vs.
put url ("binfile:" & myPath) into field 1 --applies automatic LC text conversions


On 05.12.2013, at 15:08, Mike Kerner <MikeKerner at roadrunner.com> wrote:

> I know that LC has this affinity for <LF> (ascii 10) instead of <CR> (ascii
> 13), but in this case it's going to be a problem.
> 
> I am trying to parse a text file that is output from another system.  When
> LC reads the file, it automatically interprets all the <CR>'s as <LF>'s.
> 
> Thinking I was batty, I grabbed several other development tools that I
> use.  Each and every one of them said that what LC said was an <LF> was
> really a <CR>, so just to be sure I went to the source of the file, and
> sure enough it is putting out <CR>.  Reading further through the code, it
> appears that there are cases where both <CR> and <LF> are going to be
> output, and the differences are significant to properly handling the data.
> 
> SO, do we have a way of dealing with this that I am not aware of?

-- 

Use an alternative Dictionary viewer:
http://bjoernke.com/bvgdocu/

Chat with other RunRev developers:
http://bjoernke.com/chatrev/






More information about the Use-livecode mailing list