Save emoji in mysql database

ok, it works great
and to display the emoticons in a text area how can I do?

What issues do you have displaying them?

I want to view emoticon in my chat system
in my db for example I have ??? for smile
How to view smile emoticon in my paragraph or in my textarea ?

1 Like

link at page: https://assistenza.decoresin.com/

I had to modify connection.php as shown here:

I’m not sure if Wappler handles this automatically now.

what is the exact value stored in your database? Can you share a screenshot please?

Do you have a direct access to your database like using phpmyadmin to check directly the db values?

So they don’t seem to be stored properly? Are you sure you have set the database encoding / table collation to utf8mb4?

image

same result ???

You use PHP?

Edit dmxConnectLib/lib/db/Connection.php line 61:

PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',

change it to:

PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8mb4',

ok it work fine ! Thank you

one question

how can I view è color emoticon in my web page ?

at this moment I see this:
image

the emoticon is black and white, I want view the real color emoticon !

Hey @patrick,
Any idea how to make it work on a NodeJS project too?

Also, since I’m on a Docker hosting, is there any easy way to convert the table to utf8mb4? :smiley:

bump - I’d like to know this too for Node JS

You can add the utf8mb4 charset to your connection settings. Also make sure the database/table encoding to utf8mb4

2 Likes

Sweet! Thanks Teo