Plain text library stacks - BOM needed

Peter W A Wood peterwawood at gmail.com
Fri May 1 00:57:49 EDT 2015


On 23 Apr 2015, at 15:59, Mark Waddingham <mark at livecode.com> wrote:
> 
> You can save the stack in the normal way but the only thing it will save will be the stack script - the file on disk is just a UTF-8 text file.

I’ve found that when LiveCode saves the stack script file, it adds a Byte Order Mark (BOM) to denote the file is UTF-8 encoded. If the BOM is not present when you start using such a library stack, the engine will treat it as being natively encoding. I have found that to be true with both the IDE and Server engines. So if you want to create script only stacks in an external editor make sure that the editor adds a BOM when you save the file.

If you write scripts to run with LiveCode Server that start with a shebang line, be aware that they do not work if there is a BOM present.

Regards

Peter





More information about the use-livecode mailing list