Unicode Store in JSON

Sannyasin Brahmanathaswami brahma at hindu.org
Sun Oct 14 10:26:31 EDT 2018


I need to store unicode in JSON on Mobile; and store that in SQLLite dBase

If you do a "direct" transfer

*put*(char1to35oftQuote)& "..."intosTruncFirstLine

        "Yea, jīva is actually Śiva."

# putting sTruncFirstLine into an SQLLite column
# when you get the data out, it becomes

        "Yea, jƒ´va is actually ≈öiva...."

"textEncode" won't work because it produces binary code, can't store in
JSON...

base64 should work, but I get similar results,

*        put*(char1to35oftQuote)& "..."intosTruncFirstLine

*        put*base64Encode(sTruncFirstLine) intosTruncFirstLine

                  # restore later

*        put*base64Decode(pEntryA["label"]) intotLab*el**
*

*        set*thetextoffieldtName totLabel

                # returns "garble"

What are my other options?

BR


 



 






More information about the use-livecode mailing list