I am trying to set character sets to utf8mb4 and collation sets to utf8mb4_unicode_ci. On my website the emoji's looks fine when I get the data out of the table with php/mysql select
. Only in phpMyAdmin (4.8.4) I see most emoji's as one questionamrk.
I try this:
Add to /etc/my.cnf
:
[client]
default-character-set = utf8mb4
[mysql]
default-character-set = utf8mb4
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
Restart systemctl restart mariadb
I use on my website mysqli_set_charset($con, "utf8mb4");
, <form accept-charset="UTF-8">
and <meta charset="utf-8">
.
Result of SHOW VARIABLES WHERE Variable_name LIKE 'character\_set\_%' OR Variable_name LIKE 'collation%'
:
What am I doing wrong?
I use mysql version 5.5.60 (Mariadb).
Edit: The problem might be phpmyadmin (4.8.4). It seems that phpMyAdmin is still using utf8. The global variabelen are set to utf8mb4 or utf8mb4_unicode_ci but I can't change the session variabelen:
In the 'normal' table in phpMyAdmin:
And when I try SET NAMES
everything looks fine:
Under General settings in phpMyAdmin the server connection collation is set on utf8_unicode_ci
. I can select utf8mb4_unicode_ci
, but then it switches back to utf8_unicode_ci
:(
And on my website with select
everything looks oké: