JSON, URL-encode, and UTF-8

Charles Warwick charles at techstrategies.com.au
Thu Aug 20 21:22:24 EDT 2015


Encoding the = would break the POST data, as it would no longer be assigned the json data itself as a POST variable….

you only want to url encode the contents of the json variable

> On 21 Aug 2015, at 11:17 am, Monte Goulding <monte at sweattechnologies.com> wrote:
> 
> 
>> On 21 Aug 2015, at 10:58 am, Peter W A Wood <peterwawood at gmail.com> wrote:
>> 
>> put textEncode("{ " & quote & "é" & quote & ": 1}", "UTF-8") into tJSON
>> put "json=" before tJSON
>> post URLEncode(tJSON) to URL "http://Localhost/jacque.php <http://localhost/jacque.php>"
>> put textDecode(it, "UTF-8”)
> 
> You would want to urlEncode tJSON before you put json= before it so the = isn’t encoded.
> 
> _______________________________________________
> 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