Setting the Unicode text of a field from JSON converted to array
Peter W A Wood
peterwawood at gmail.com
Mon Nov 10 06:26:28 EST 2014
> On 10 Nov 2014, at 13:06, Brahmanathaswami <brahma at hindu.org> wrote:
>
> i tried that already:
>
> case "original_script"
> set the unicodetext of field "lyrics" to uniencode(tContent, "utf8")
> break
>
> but still get garble
>
>
> ??
>
>
>
> ?? 555
>
> 555
>
> ? 555
> [snip]
You need to process the JSON data before putting it into a string. As far as I know,LiveCode recognises “\u0ba9” as a string containing 6 characters. You need to process that to change it to the single character numToCodepoint(0x0ba9) or it’s preLiveCode 7 alternative. (The \, u, 0, b, a, and 9 will be UTF-8 encoded though.)
That is unless mergJSON “de-escapes" the JSON for you.
Regards
Peter
More information about the use-livecode
mailing list