Mysql
 SQL >> Database >  >> RDS >> Mysql

Usare correttamente utf8mb4 con PHP e MySQL

Il punto chiave è che utf8 di MySQL non è vero UTF-8 completo, mentre utf8mb4 è UTF-8 reale.

Assicurati che la connessione tra PHP e MySQL usi utf8mb4.

mysql_set_charset('utf8mb4');

Con PDO puoi impostare il charset nel DSN. mb_internal_encoding, invece, non riguarda MySQL.