Getting Question marks for German characters in HTML using PHP and MySQL
Question
I have done quite a bit of searching and still can't seem to figure this out, so I apologize if there's a perfectly good answer out there.
I'm using PHP to access German words in MySQL and the unique characters (öäüß) show up as �.
I've tried
Setting the Character set of the table to UTF8 with:
ALTER TABLE Words CHARACTER SET utf8 COLLATE utf8_general_ci;
Setting the communication link between PHP and MySQL to UTF8 (probably not correct terminology) after making the connection with:
mysql_query("SET NAMES utf8");
(as well as similar things like:
mysql_query("set character_set_client='utf8'"); mysql_query("set character_set_results='utf8'"); mysql_query("set collation_connection='utf8_unicode_ci'"); mysql_set_charset('utf8', $conn);
Setting the header response to send in UTF8 with:
header("Content-type: text/html; charset=UTF-8");
My page does include the meta tag:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
I'm using NetBeans and it's saving in UTF8. I can add the characters directly to the HTML and they display correctly.
I hope that all makes sense. Sorry if I've forgotten something important. Thanks very much for any help!
No correct solution