I am pulling in an RSS feed using PHP. I get weird characters in my feed when the article contains characters like ’.
I have tried htmlentities with ENT_SUBSTITUTE, htmlspecialcharacters, iconv and several sanitize functions, none of which ultimately worked.
Use output buffering on the whole page, then use htmlentities() on the content before flushing it.
Where is the data coming from? If it is from a database, are you sure that you set the encoding correctly? I always recommend UTF-8.