Arrays and TextEncode/Decode

Monte Goulding monte at sweattechnologies.com
Fri Oct 16 15:41:10 EDT 2015


> On 17 Oct 2015, at 6:34 am, Peter Haworth <pete at lcsql.com> wrote:
> 
> Normally, it
> seems to be the rule that you should textEncode data when writing it out to
> a file and textDecode it when reading it in from a file.  Is that still the
> case when the data is arrayEncoded?

arrayEncode|Decode packs and unpacks your data for you in such a way that you don’t need to be concerned about this. I imagine this was a large part of the reason for the update to the format.

So because the engine knows the file format of encoded arrays it can decode them. Just like it knows the format of stacks. If you were saving a block of text to a file though then you would definitely need to textEncode|Decode because the engine has no idea of the encoding of the file.

Cheers

Monte


More information about the use-livecode mailing list