I have a problem with my code. I created a php page which make a connection to a database, extract some fields from a table then echo the result of the query to a html div in the body. The problem is my website is in croatian, so i have characters like č,ž,š... which are not displayed (it display a question mark instead). I searched the web for like 2 days without a solution. I set a
header('Content-Type: text/html; charset=utf-8');
I also set html meta tag:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
my php page is saved in utf-8 with unicode normalization form C, the database have charset UTF-8, the table and fields are all utf-8, the collation of the database is utf-8 general ci.
If you need I can provide my code too (I just avoid it at the moment to don't make the post too long).
Another interesting thing is that if I create in my php file a normal html tag like a and write something in it with č,ć,š the characters are displayed but when I use php to extract some info from the base then the characters are replaced. Also in the database the characters are all correct and everything looks good. Last thing, my page loads k2 items from a k2 page in an iframe, and all the rest of the pages work fine.
I really don/t know how to fix that so every suggestion will be well accepted :D