+2  A: 
  1. Save your PHP files as UTF-8.
  2. Upon connection do SET NAMES 'UTF8';

If you still need to replace characters do the following:

$string = preg_replace('~&([a-z]{1,2})(acute|cedil|circ|grave|lig|orn|ring|slash|th|tilde|uml);~i', '$1', htmlentities($string, ENT_COMPAT, 'UTF-8'));

EDIT:

$string = html_entity_decode(preg_replace('~&([a-z]{1,2})(acute|cedil|circ|grave|lig|orn|ring|slash|th|tilde|uml);~i', '$1', htmlentities($string, ENT_COMPAT, 'UTF-8')), ENT_COMPAT, 'UTF-8');
Alix Axel
pedalpete
I just edited my answer, try it now.
Alix Axel
From my intial test on your edit, i am noticing an issue with quotes. I've changed it to htmlentities($string, ENT_NOQUOTES, 'UTF-8'), ENT_QUOTES,'UTF-8'). That seems ok, but I'm getting '’' for '’'. I would have expected that to come out as RSQUO at the least, but unfortunately not. Any ideas on how to fix that?
pedalpete