I have created a web-based UTF-8 XML feed for use in an iPhone application.
When viewing in a web browser, if the feed contains a British Pound sign, I get a nasty X
My final solution which seems to work in all cases is to replace all special chars as they are input.
public function xmlEntities($text)
{
$search = array('&','<','>','"','\'', chr(163), chr(128), chr(165));
$replace = array('&', '<', '>', '"', ''', '£', '€', '¥');
$text = str_replace($search, $replace, $text);
return $text;
}