When you see <question marks , your document was not saved in the correct encoding (it should be UTF-8 in your case), or it is not served with the correct headings and / or meta tags.
If you want to work with special characters like è , your html document should be saved as UTF-8 and used as UTF-8:
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
In addition, you must use UTF-8 to connect to the database:
... ("SET TITLES utf8");
... ("SET CHARACTER SET utf8");
Last but not least, you must use UTF-8 for the database itself.
As you will notice, you are already on the right track ... you just need to “use it all” (as I described above), instead of trying to ignore the others at the same time. This is the combination that makes it work. Simpler said: if you go “UTF-8” you will have to think “UTF-8” everywhere and stick to it in your html files, headers, meta tags, connections to the database and the database. Use the same encoding everywhere and stick to it, instead of using the "UTF-8 bit here and the ISO bit there."
source share