Would someone please tell me how to solve this encoding conflict?
Note: My files are saved as UTF-8 files.
When I use:
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
Webpage shows chars below as normal (they are hard-coded in the page):
çÇ, ğĞ, şŞ
But when the same characters come from DB (encoded with mysqli) they appear abnormal:
��, ��, ��
When I use:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9">
<meta http-equiv="Content-language" content="tr">
Webpage shows chars below abnormal (they are hard-coded in the page):
ğâ, ıİ, şı
But when the same characters come from DB (encoded with mysqli) they appear normal:
çÇ, ğĞ, şŞ
After reading the post as given by @Mihai above, I solved the problem with
$mysqli->set_charset('utf8mb4');
and just kept<meta charset="utf-8">
. That's it!