base64encode & decode in a standalone
Mark Brownell
gizmotron at earthlink.net
Sun Feb 1 11:24:01 EST 2004
On Saturday, January 31, 2004, at 06:05 PM, I wrote:
> I believe that I read about this somewhere but I can't find it in the
> list archives. I have a save file function that compresses then
> base64encodes some data as it puts this data into a URL using binfile:
> This works on Mac10.2.4 in the IDE but it doesn't work in the
> standalone. The base64Encodes & base64Decodes scripts are ignored in
> the standalone but they save and open as compressed.
While trying to fix this I got this to work in the standalone:
put compress(tankX) into tkx
put base64Encode(tkx) into tky
set the fileType to "ttxtTEXT"
put tky into URL ("binfile:" & it)
It looks like the fileType matters before it will save as base64Encoded.
I can make this work as an option for deliberately base64Encoding
files. I have no problems saving my own fileType, "MTMLMTML," with
compression.
What's really strange is that it looks like any file that has been
base64Encoded are the only type that open now. This is what I wanted
originally and I can't figure out why yet. Certainly it must be some
fileType issue allowing this to work.
Mark
More information about the use-livecode
mailing list