title: php mysql character set: storing html of international content
body: <p>i'm completely confused by what i've read about character sets. I'm developing an interface to store french text formatted in html inside a mysql database.</p>
  
  <p>What i understood was that the safe way to have all french special characters displayed properly would be to store them as utf8. so i've created a mysql database with utf8 specified for the database and each table.
  I can see through phpmyadmin that the characters are stored exactly the way it is supposed to. But outputting these characters via php gives me erratic results: accented characters are replaced by meaningless characters. Why is that ?</p>
  
  <p>do i have to utf8_encode or utf8_decode them? note: the html page character encodign is set to utf8.</p>
  
  <p>more generally, what is the safe way to store this data? Should i combine htmlentities, addslashes, and utf8_encode when saving, and stripslashes,html_entity_decode and utf8_decode when i output?</p>