URLencode bug?

stephen barncard stephenREVOLUTION2 at barncard.com
Fri Mar 18 03:05:24 EDT 2011


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>



More information about the use-livecode mailing list