use-livecode Digest, Vol 222, Issue 27
Alan Stenhouse
alanstenhouse at hotmail.com
Fri Mar 18 20:01:26 EDT 2022
Yes, you should textencode() to UTF when storing and textdecode() when reading - at least doing that on mobile worked for me.
cheers
Alan
> On 19 Mar 2022, at 8:01 am, Paul Dupuis via use-livecode-request at lists.runrev.com wrote:
>
> On 3/18/2022 12:18 PM, Dan Friedman via use-livecode wrote:
>> I can't be the first to bring this up, so sorry if this has been asked already...
>>
>> Is there a current solution for Emojis in text? On a mobile device, in a native field, a user enters a emoji (no method to stop them that I can find). I save that text somewhere like a database. When I load it back (into a LC field for display), it appears as a question mark. What up? Anyone have knowledge on this topic? Is there a useEmojis property I don't know about?
>>
>
> It probably depends on 2 things:
>
> 1) If the app the Emojis are created in is creating them as Unicode
> Emojis or as images. If they are created as images, then they are
> probably not getting transferred to the database correctly. If they are
> Unicode, also make sure they are not being lost in the upload to the
> database - the database encoding needs to support some Unicode encoding
> like UFT8
>
> 2) If the database has the correct data, then when loading it into a
> LiveCode field you probably need to textDecode (see dictionary) the data
> from UTF8 to LiveCode's native (UTF16) text.
>
> See https://unicode.org/emoji/charts/full-emoji-list.html as well
More information about the use-livecode
mailing list