title: Getting special characters out of a MySQL database with PHP
body: <p>I have a table that includes special characters such as ™.</p>
  
  <p>This character can be entered and viewed using phpMyAdmin and other software, but when I use a SELECT statement in PHP to output to a browser, I get the diamond with question mark in it.</p>
  
  <p>The table type is MyISAM. The encoding is UTF-8 Unicode. The collation is utf8_unicode_ci.</p>
  
  <p>The first line of the html head is</p>
  
  <pre><code>&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;
  </code></pre>
  
  <p>I tried using the htmlentities() function on the string before outputting it. No luck.</p>
  
  <p>I also tried adding this to php before any output (no difference):</p>
  
  <pre><code>header('Content-type: text/html; charset=utf-8');
  </code></pre>
  
  <p>Lastly I tried adding this right below the initial mysql connection (this resulted in additional odd characters being displayed):</p>
  
  <pre><code>$db_charset = mysql_set_charset('utf8',$db);
  </code></pre>
  
  <p>What have I missed?</p>