TextDecode JSON array

J. Landman Gay jacque at hyperactivesw.com
Sat Jan 21 22:22:16 EST 2017


Here's a test sample of some UTF8 I get back from a server:

   {"UserID":48,"UserName":"Eduardo Ba\u00f1uls","UserLoginName":"ebanu"}


If I run textDecode(<string>,"UTF8") on it, I get it back unaltered. 
Does anyone recognize the text encoding? It doesn't seem to be UTF8.

If I then run JSONToArray on it, I get a LC array and the name is 
changed to this:

   Eduardo Bañuls

And when I run textDecode on *that* it comes out right:

   Eduardo Bañuls

So what's the first string? JSONtoArray seems to recognize it. I'd like 
to decode the JSON array completely before passing it to JSONtoArray. If 
I can do that, I don't have to loop through all the array keys, decoding 
each one individually.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com





More information about the use-livecode mailing list