I am struggling with the special character encoding on my website. I have an input
field with a connected datalist
. The datalist
is populated from my database when the page is loaded. But somehow I get those question mark inside diamond symbols for each special character in the datalist options and normal question marks for special language characters (e.g. Chinese). Here is what I tried:
- The initial dataset is a csv file, which I included in my database. I checked the collation in Notepad++ and it is set to UTF8 without BOM.
- I am using phpmyadmin for database management. The server connection collation is set to utf8mb4_bin. The table where I store the data has the collation utf8_bin. And when I imported the data I made sure to use utf8. The characters are also displayed correctly in phpmyadmin.
- In the
<head>
section of my index.php file I have also the following<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
But I still get those question marks. What else I could check??