Does anyone have any tips on saving emoji characters in the MySQL database? I have a normal free account and have tried all the steps to get this to work, is it possible?
I have followed these instructions and these which worked in my local test environment but I can’t seem to get it working here.
I am testing by editing data in phpMyAdminand it isn’t working so this isn’t a connection issue.
Usually you will be interested in changing your MySQL collation in order to solve problems with foreign character encodings.
This can be done by using phpMyAdmin and following the instructions below:
Enter your Control Panel and click on the phpMyAdmin icon in the Databases box.
Select the database you wish to manage from the drop-down menu on the left
Click on the Operations tab in the top menu of your phpMyAdmin
At the bottom of the page you will see the collation option. You can now select a collation from the drop down menu and click on the Go button.
Please note that after your change the collation of a database only the new tables will be created with the new collation. All other tables remain with the collation, they were initially created.
Thank you so much for your help, I have got it working now.
The issue is with the phpMyAdmin panel, if I insert or view the data through my website the emojis work!? It doesn’t seem to be a browser issue as it is the same on Chrome and Safari.
This fixes everything for me as I can add all the data through PHP functions now.
Note to self:
Test the front-end as well before posting in the forum
Just as a side note, using the BLOB data type shouldn’t have to be the answer here. BLOB and TEXT columns are quite bad for performance, and should only be used if your data is too big to fit into a VARCHAR column.
The phpMyAdmin version we’re using is quite old and runs on an old PHP version, so I wouldn’t be surprised if it’s the culprit.