I have been reading for the last two days about this. Most posts seem to be a bit old. (seem to predate the utf8mb4 encoding in Mysql) At this point I can insert Japanese characters from a webpage using php. When I retrieve the data it is displayed correctly in the webpage but not in phpmyadmin.
I can also insert Japanese characters into the database using phpmyadmin and then they are displayed correctly in phpmyadmin but not on the webpage if I retrieve the same data.
I added this to my.cnf file
[mysqld]
collation-server = utf8mb4_unicode_ci
init-connect='SET NAMES utf8mb4'
character-set-server = utf8mb4
SHOW VARIABLES LIKE 'char%' gives me
Variable_name Value
character_set_client utf8
character_set_connection utf8mb4
character_set_database utf8mb4
character_set_filesystem binary
character_set_results utf8
character_set_server utf8mb4
character_set_system utf8
character_sets_dir /usr/share/mysql/charsets/
SHOW VARIABLES LIKE 'collation%'
Variable_name Value
collation_connection utf8mb4_unicode_ci
collation_database utf8mb4_unicode_ci
collation_server utf8mb4_unicode_ci
How can I change the character_set_client, character_set_results and character_set_system from utf8 to utf8mb4 and will this enable me to input Japanese that will be displayed correctly on the webpage using phpmyadmin ?
On a side note is the html appropriate or is there some charset that is closer to UTF8MB4 ?
thank you