file: vs bibfile: usage?

Brian Milby brian at milby7.com
Fri Jan 4 13:07:38 EST 2019


On a Mac you have to use binfile if you want the appropriate line endings (LF)* as file will change them to the legacy version (CR).  On Windows, you probably still want to use file so that the line endings are adjusted to CRLF.  UTF recognizes both as valid (CRLF and LF), not sure about CR.

* I use Xcode as my justification to say that LF is proper.  It is the line ending used there.

Thanks,
Brian
On Jan 4, 2019, 11:54 AM -0600, Paul Dupuis via use-livecode <use-livecode at lists.runrev.com>, wrote:
> I have seen example in the dictionary, for example in the LC901
> Dictionary under "textEncode" entry, where LC9 text (in a field or
> variable) is encoded as UTF-8 and written to a file as:
>
> puttextEncode(tSomeText,"UTF-8") intoURL ("file:"&tSomeFile)
>
> However, my understanding is the the "file:" identifier tries to do
> "intelligent" line ending translation for the platform LC is running on.
> So in order to produce true UTF8 platform independent output, the
> examples should be
>
> puttextEncode(tSomeText,"UTF-8") intoURL ("binfile:"&tSomeFile)
>
> In other words, should not the rule be that when outputting anything
> other than "native" text (MacRoman (OSX) or Latin-1 (Win) or ISO for
> Linux), should it always be written a "binfile:" (i.e binary) so the
> coding is not changed?
>
> Does any LC expert know the answer to this?
>
>
>
> _______________________________________________
> 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



More information about the use-livecode mailing list