When is 10 really 13?

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


There's no "liking". :P

As explained, when using "file", LC assumes it's a text file, and that you want conversions to happen. The same goes for fields. But in fact I think there's only a case where mactoiso() get transformed when it's in a field, and that is when you open a stack in windows/linux that was last saved on a mac (and vice versa for isotomac()). However I think it doesn't change line endings in such a case.

So it's very easy: If you want text unchanged by automatisms in LC, and for it to retain it's characteristic, then don't store it in a field, and don't use "file:" for urls, simply use "binfile:" instead.


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

> So, aside from this situtation, when else will <CR> be <LF> in the LC
> universe?  Like I said, I know LC likes <LF>, but if it's substituting one
> for another, that's a problem.
> 
> 
> On Thu, Dec 5, 2013 at 9:13 AM, Thierry Douez <th.douez at gmail.com> wrote:
> 
>> Hi MIke,
>> 
>> Opening your text file in *binary" mode :  "binfile:whatever"
>> then with the replace() function , get rid of what you don't want...
>> 
>> Does that help ?
>> 
>> Thierry
>> 
>> 
>> ------------------------------------------------
>> Thierry Douez - http://sunny-tdz.com
>> Maker of sunnYperl - sunnYmidi - sunnYmage
>> 
>> 
>> 2013/12/5 Mike Kerner <MikeKerner at roadrunner.com>
>> 
>>> 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?
>>> 
>>> --
>>> On the first day, God created the heavens and the Earth
>>> On the second day, God created the oceans.
>>> On the third day, God put the animals on hold for a few hours,
>>>   and did a little diving.
>>> And God said, "This is good."
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> 
> 
> 
> -- 
> On the first day, God created the heavens and the Earth
> On the second day, God created the oceans.
> On the third day, God put the animals on hold for a few hours,
>   and did a little diving.
> And God said, "This is good."
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


-- 

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