How do I make special characters appear in my PHP page, knowing that I call the content using an SQL query. For example é appears as � and so on for all other special characters.
I'm using a MySQL server. The db collation was set to utf8_unicode_ci, however some attributs of the tables were set to latin1_swedish_ci
ALTER DATABASE databasename CHARACTER SET utf8 COLLATE utf8_unicode_ci;
This should work for entire DB. Source
Use the UTF-8 character set when you create a database or table:
CREATE DATABASE Soccer CHARACTER SET utf8 COLLATE utf8_general_ci;
You can find further information here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With