First I read that question's anwser but that didn't help.
I added mysqli_set_charset($cnx, 'utf8mb4');
or mysqli_set_charset($cnx, 'utf8');
with no luck.
I'm storing strings in a mysql database, with utf8_general_ci.
I have accented characters, for example in phpmyadmin I have É that will become É with a simple mysql select and php print.
But on my new server, after I copied all files and restored a dump with mysql -p < dump.sql, that stays É when displayed on the page.
Other strings on the page are displayed normaly, only those comming from mysql have the problem. But I don't understand the cause as the files and database are the same that on my old server.