URLencode bug?

Chipp Walters chipp at altuit.com
Fri Mar 18 04:20:29 EDT 2011


I wrote out the URLencoded text to a txt file and was able to open it in Notepad and see it was all there. The Google API I was using kept throwing errors, which led me down some path confusing me whether or not the data was really URLencoded. After a bit of needed error checking, and changing to posting vs getting, things are working fine.

Yep, years ago I wrote a stack sharing library for Rev which passed back and forth via a server any changes made to stacks, thus allowing multiple people in remote locations to work on the same stack at the same time, and used the base64encode trick you mention to encode all meta data for all controls and their properties. Worked well.

Chipp Walters
CEO, Shafer Walters Group, Inc

On Mar 18, 2011, at 2:05 AM, stephen barncard <stephenREVOLUTION2 at barncard.com> wrote:

> Ah, but you can use them for storage Great way to preserve small blocks of
> data.
> FUNCTION libFile_HXEncode pData
>         put base64encode(pData) into tData
>         replace return with linefeed in tData
>         return tData
> END libFile_HXEncode
> 
> FUNCTION libFile_HXDecode pData
>         replace linefeed with return with tData
>         put base64decode(pData) into tData
>         return tData
> END libFile_HXDecode
> 
> Base64Encode after using URLEncode can be an almost bulletproof way to
> store data in situ.
> one can create medium sized, neat readable blocks of data in your script
> that look like formatted object code blocks.
> The data could be exact htmlText that you want with placeholders encoded in.
> Or "perfect" MySQL calls with the 'right'  punctuation.
> 
> /*
> 
>     BASE64Encoded:
> 
>     SELECT
> 
>     dm.Device_Number,
> 
>     dm.id
> 
>     FROM ( DEVICES_Main_R AS dm
> 
>     INNER JOIN Devices_Types AS devABBRV ON dm.Device_Abbrev=devABBRV.id )
> 
>     WHERE devABBRV.Device_Abbrev LIKE '<deviceAbbrev>' ;
> 
> */
> 
> 
> get \
> 
> 
> "U0VMRUNUCiAgZG0uRGV2aWNlX051bWJlciwKICBkbS5pZAogIEZST00gKCAgREVWSUNFU19N"
> &\
> 
> 
> "YWluX1IgQVMgZG0KICAgICAgSU5ORVIgSk9JTiAgRGV2aWNlc19UeXBlcyBBUyBkZXZBQkJS"
> &\
> 
> 
> "ViBPTiBkbS5EZXZpY2VfQWJicmV2PWRldkFCQlJWLmlkICkKV0hFUkUgZGV2QUJCUlYuRGV2"
> &\
> 
>              "aWNlX0FiYnJldiBMSUtFICc8ZGV2aWNlQWJicmV2PicgOw=="
> 
> put base64decode(it) into tSQL
> 
> 
> 
> Nicer for some things over custom properties because you can keep all the
> data and code in the same place.   Not easy to hand code this but easy to
> make a code builder in rev. I will include some comment english text
> explaining what it is.
> 
> On 17 March 2011 23:19, Chipp Walters <chipp at chipp.com> wrote:
> 
>> For my app, the cr's screw it up. Thanks anyway.
>> 
> 
> Stephen Barncard
> San Francisco Ca. USA
> 
> more about sqb  <http://www.google.com/profiles/sbarncar>
> _______________________________________________
> 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