I have a Wordpress site using a MySQL database. I would like to put a Greek word (Ἀπὸ) in my database. (Notice how nicely it renders here in the Stack Overflow interface.) If I do, it goes into the table just fine and renders just fine in Sequel Pro. However when I use some PHP to read it out of the table and add it to a page on my Wordpress site, it renders ??? instead of Ἀπὸ. If I add the word directly to a page in the Wordpress interface however, it shows the Greek characters just fine in both the interface and on the rendered page. I took a look at the page that shows ??? and I see the line:
<meta charset='utf-8'>
I believe that should be all it takes to render these Greek characters. What am I missing?
Edit
Because someone asked for it:
CREATE TABLE `scripture` (
`id` int(6) unsigned NOT NULL AUTO_INCREMENT,
`translation` varchar(4) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`content` varchar(1200) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`book` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`chapter` int(3) NOT NULL,
`verse` varchar(7) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`first_verse` int(3) DEFAULT NULL,
`topic` varchar(200) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`related1` int(6) DEFAULT NULL,
`related2` int(6) DEFAULT NULL,
`related3` int(6) DEFAULT NULL,
`related4` int(6) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `book_chapter_verse_translation` (`book`,`chapter`,`verse`,`translation`),
KEY `translation_book_chapter_first_verse` (`translation`,`book`,`chapter`,`first_verse`)
) ENGINE=InnoDB AUTO_INCREMENT=1129 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
character_set_client utf8
character_set_connection utf8
character_set_database utf8
character_set_filesystem binary
character_set_results utf8
character_set_server latin1
character_set_system utf8
character_sets_dir /rdsdbbin/mysel-5.6.23.R1/share/charsets/
wp-config.php has the following:
/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');
/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');
I have tried commenting them out and I have tried making DB_COLLATE = utf8_unicode_ci
Second Edit
The solution was to add the following PHP code ahead of the query:
$mysqli->set_charset("utf8");