Emojis not displayed properly

Here’s a strange issue that probably not too many people have run across…

I wanted to make a 5-character string filled with random emojis from https://getemoji.com so I tried these blocks:

But they result in this when previewed:

image

Or other strange renderings where the emojis (there should be 5 red hearts) are displayed strangely:

image

It’s definitely related to the emoji characters and also to the in text get block because if I replace the emojis with something like text symbols ("!@#$%^&"), it works fine and if I set the label’s text to “:heart::heart::heart::heart::heart:” it works fine.

My example above shows a random letter from the string “:heart:”. That was just to illustrate the problem. The actual string I’m hoping to use is:

:smiley::grinning_face_with_smiling_eyes::grin::laughing::sweat_smile::joy::rofl:🥲:innocent::slightly_smiling_face::upside_down_face::wink::relieved::heart_eyes::smiling_face_with_three_hearts::yum::stuck_out_tongue::stuck_out_tongue_closed_eyes::stuck_out_tongue_winking_eye::crazy_face::face_with_raised_eyebrow::face_with_monocle::nerd_face::sunglasses:🥸:partying_face::smirk::unamused::disappointed::worried::confused::confounded::weary::pleading_face::cry::triumph::angry::flushed::disappointed_relieved::sweat::hugs::thinking::lying_face::neutral_face::grimacing::roll_eyes::hushed::open_mouth::astonished::yawning_face::sleeping::sleepy::woozy_face::mask::face_with_thermometer::money_mouth_face::cowboy_hat_face:

Then again, some of the emojis right above are also not formatting correctly… I wonder if something changed in the emoji encoding or in Thunkable. I wasn’t having problems like this before.

2 Likes

Remember that emojis are sometimes 2 characters and sometimes 3 or 4 so you need to create a List of objects that contains the emoji itself and another property to store the number of characters it consists of so you can properly get the in text part.

3 Likes

Thanks, I didn’t realize that. Is there an easy way to determine the string length of an emoji then?

Edit: That’s alright, I looped through each 2-character substring and added them to a list. That worked!

2 Likes