Displaying or identifying emoji

Stephen MacLean smaclean at madmansoft.com
Wed Jan 23 09:15:13 EST 2019

Hi David,

Looks like you are running into some of the same issues I had when learning to work with them…

You say you are importing them? From where? A text file or DB?

Make sure that the encoding is set to UTF-8 or higher when you import. Next, you need to textDecode() them, again making sure that encoding matches.

One MAJOR caveat that I ran into with using mySQL. After opening the connection, you need to add the following code to fore the connection to unicode:

## Set utf8mb4

revExecuteSQL tDatabaseID, "SET NAMES 'utf8mb4'"

Or whatever your encoding is on that table. Otherwise it will default to ascii and you will get those characters.

Also, depending on the emoji, it may be 1 codepoint or many. Use the keyword “word” when finding, etc.

Hope this helps!


Steve MacLean

> On Jan 23, 2019, at 7:34 AM, David V Glasgow via use-livecode <use-livecode at lists.runrev.com> wrote:
> Hello folks,
> I am working on imported text messages from various sources, and which have been through various (unknown) processes/displays before I get them.  Some retain emoji intact, but others render them as an odd series of characters (presumably having been substituted when stored in a non-unicode environment):
> 	582	hexman555 (04/17/15 11:13:54 PM): I'll be here 😊❤️
> 	600	hexman555 (04/17/15 11:32:15 PM): Me too ❤️
> 	615	hexman555 (04/17/15 11:49:18 PM): Thank you ❤️💋
> 	625	hexman555 (04/17/15 11:52:29 PM): ❤️❤️❤️
> I would like to know which emoji were being used, either by displaying them in the field or substituting "‚ù§Ô∏è” etc with parenthetic text describing the emoji.  I have tried to break emojis down, but can’t find an app that doesn’t display them - or rather mangles them in this way.  Similarly, I have looked at the ascii and hex of the component characters of the gobbledegook, but can’t see a pattern.
> Any suggestions?
> Best Wishes,
> David Glasgow
> <http://www.i-psych.co.uk/> <https://twitter.com/iPsychApps>
> <https://twitter.com/iPsychApps> <http://uk.linkedin.com/in/davidvglasgow>
> <http://uk.linkedin.com/in/davidvglasgow>
> _______________________________________________
> 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