来自XML和奇怪字符的HTML输出

Im using CURL to fetch Twitter RSS, then write those tweets to Wordpress.

Here is an example of the XML:

  <title>Bob: Twitter&#8217;s @Anywhere Platform Is Now Live - http://bit.ly/b54cTS</title>

I then write this to Wordpress, but the result is:

Bob: Twitterâs @Anywhere Platform Is Now Live - <a href="http://bit.ly/b54cTS" target="_blank">http://bit.ly/b54cTS</a>

Not the âs character, can any suggest what I might be doing wrong?

Somewhere between the data coming out of the XML parser and the page being sent to the client, there is a disagreement about what the character encoding is.

Make sure you use the same encoding (UTF-8 is wise) throughout. (The XML document is plain ASCII so it isn't a problem with the data there).

The W3C provides an introduction with links to further resources.

Maybe the problem is in XML encoding?

Adding this should fix it. Maybe not the title tag though. I'm not sure about that actually.

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />