I copy MSSQL table to mysql table using (dbconvert.com) All the emoji in the SQL SERVER ( טוב) set in mysql like that (טוב����).
It wasn't a problem until I was trying to do json_encode to a query that include emoji in this text.
This is the code problem:
echo json_encode($forumPage);
I don't have problem inserting emoji My problem is the old convert from mssql
.
Some things I had tryied
1) adding
header('Content-Type: application/json; charset=utf-8');
2) using
json_encode($forumPage,JSON_UNESCAPED_UNICODE);
3) using (this is Wordpress site)
define('DB_CHARSET', 'utf8mb4');
Some extra info about my DB:
SHOW VARIABLES WHERE Variable_name LIKE 'character\_set\_%' OR Variable_name LIKE 'collation%'
+--------------------------+--------------------+
| Variable_name | Value |
+--------------------------+--------------------+
| character_set_client | utf8mb4 |
+--------------------------+--------------------+
| character_set_connection | utf8mb4 |
+--------------------------+--------------------+
| character_set_database | utf8mb4 |
+--------------------------+--------------------+
| character_set_filesystem | binary |
+--------------------------+--------------------+
| character_set_results | utf8mb4 |
+--------------------------+--------------------+
| character_set_server | utf8mb4 |
+--------------------------+--------------------+
| character_set_system | utf8 |
+--------------------------+--------------------+
| collation_connection | utf8mb4 |
+--------------------------+--------------------+
| collation_database | utf8mb4 |
+--------------------------+--------------------+
| collation_server | utf8mb4 |
+--------------------------+--------------------+