tags:

views:

44

answers:

3

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&lt;/title&gt;

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&lt;/a&gt;

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

A: 

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.

David Dorward
A: 

Maybe the problem is in XML encoding?

Manuel Bitto
No, the XML is plain ASCII
David Dorward
+1  A: 

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" />
ThrivingKings