I haven't come across that yet but probably because I base64 encode the array as well as array encode it and don't write to the file in binary mode.
Which raises another question. I'm converting the app to 7.0 to be unicode compliant. The data in the array will have been textDecoded format. Do I need to textEncode it before base64/arrayencoding it? Pete lcSQL Software <http://www.lcsql.com> Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html> On Sat, May 2, 2015 at 5:06 PM, William Prothero <proth...@earthednet.org> wrote: > I found an oddity with arrayEncode and arrayDecode, When I saved an array > to a file, first using arrayEncode(myArray), wrote it out as > > put arrayEncode(myArray) into theEncodedArray > put theEncodedArray into URL(“binfile:”&myfile) > > and then read it back in using > put URL(“binfile:”&myFile) into theEncodedArray > put arrayDecode(theEncodedArray) into myArray > > myArray has the first element as a blank entry. It’s not the same array as > I started with. > > My array looks like myArray[1][“name”], myArray[2][“name”], etc > > This seems like a bug to me. I didn’t get any satisfaction when I set the > storage method as text, but then again, I couldn’t find a lesson where that > format was specified. But, it seems like whether it’s binary or not, it > should still read back in and decode correctly. > > Regards, > Bill > > > > > On May 2, 2015, at 2:11 PM, Mark Talluto <use...@canelasoftware.com> > wrote: > > > > On May 2, 2015, at 10:48 AM, Peter Haworth <p...@lcsql.com> wrote: > > > >> However, there is no version parameter for the arrayDecode function. > Does > >> this mean that LC7 can detect the encoding of the array and decode it > >> appropriately? > > > > > > Yes indeed! > > > > > > Best regards, > > > > Mark Talluto > > livecloud.io > > canelasoftware.com > > > > _______________________________________________ > > use-livecode mailing list > > use-livecode@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@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode