I have never had so much trouble with anything in my life as I have with this UTF-8 character set.
I have a site and a phpBB forum. I run a query on the phpBB topics table to pull the most recently updated topics for display elsewhere on my site. I basically pull the topic title.
The problem is that Russian characters (from spammers) show up just as question marks elsewhere on my site but display fine as Russian characters in the forum.
I have this line in my HTML for both the forum and my website:
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
On the Home page for phpMyAdmin it displays this information about the character set:
MySQL charset: UTF-8 Unicode (utf8)
phpMyAdmin lists the collation on the phpBB topics table as:
The collation on the topic_title field inside the phpBB topics table is:
When I pull the topic_title to display on the rest of my site, I do a basic mysqli query, loop through the result set and then display the field. $row['topic_title'].
So, what could possibly be going wrong to cause my query to display question marks when phpBB displays the Russian characters just fine?
Do I need to put something in my PHP code to force the MySQL server to always return UTF-8? Or is it a problem in my web page where I have to manually set a UTF-8 header for each and every page view?
Thanks for your help.