PHP: mysqli::set_charset – Manual
To align both the character set (e.g., utf8mb4) AND the collation sequence with the schema (database) settings: To confirm: will output something like: character_set_name: utf8mb4 character_set_connection: utf8mb4 collation_connection: utf8mb4_unicode_520_ci