title: With PHP and MySQL, how do I properly write smart quotes to the database?
body: <p>I have a PHP website with the <a href="http://premiumsoftware.net/cleditor/" rel="nofollow">CLEditor richtext control</a> on it. When I try to write Euros and British Pounds to the database, the character goes through just fine because I have the charset set to UTF-8 in the containing page HTML, in the richtext control IFRAME HTML, and in the MySQL table collation. All is well on that front. However, when I try to write <a href="http://en.wikipedia.org/wiki/Quotation_mark_glyphs" rel="nofollow">smart quotes</a>, I end up seeing this output in the database:</p>
  
  <pre><code>This is a â€œtestâ€.
  </code></pre>
  
  <p>(If that doesn't show up properly above in you browser, the test word has something like a Latin a, a Euro symbol, and the small AE symbol in front of the word, and a Latin a and a Euro symbol after it.)</p>
  
  <p>When I use PHP to read that value back out of the database to display it on the page, it ends up as black diamonds with question marks on them as well as some other Latin characters.</p>
  
  <p>What should I be doing to fix this?</p>