I’m trying to store emojis in my database and then display them with Wappler.
Problem: Wappler is incorrectly displaying emojis.
Possible reasons that I can think of:
Wappler is incorrectly interpreting the DB
I’ve stored it incorrectly in my DB, but it shows up fine when I write my own PHP file to get the info from the database.
I’ve got my own (non Wappler) script that I made in php. It hits an IMAP mailbox, processes everything, sanitizes the text, figures out the MIME format, and decodes whatever it was in. Then it adds it to the Maria Database (like MySQL).
Ignore some of the, uh, “funny text”, I had a buddy send me texts from an iPhone for testing 'cause I only have an android. He thought he’d be funny.
PICTURE OF THE DATABASE
Picture of how it is displayed with my own PHP file that retrieves the info from the DB and echoes it out:
As you can see, Wappler is displaying it EXACTLY how it’s stored in the Database, rather than outputting it as an emoji.
So, I’m unsure why (1) my stuff interprets the MySQL code as emoji, correctly. Or (2) why Wappler doesn’t.
But my code works in Firefox, Chrome, and (GASP) Microsoft Edge.
I’ve tried changing the Charset to utf8mb4 in Wappler’s connection.php file as some other have done with success in this forum.
I had gotten everything set properly in Wappler and the PHP page that I coded. I was sure of it.
So, yesterday I started doing some tests. I had set my database as charset utf8mb4 and collation utf8mb4_unicode_520_ci.
It should have worked, but upon further investigation the DB was NOT set with the proper charset. It was set to Latin 1. Even though it had been changed.
So I changed Wappler to read Latin 1 and it worked just fine… for now, most emojis can be read with Latin 1 but because of how bits are written it may break in the future… so it has to get fixed.
So I contacted some help with my server company. The first level guy couldn’t directly change the charset either. So, he’s elevated it to an engineer who is working on it.