Jump to content

How can I escape � character from xml/rss?


ayoksus

Recommended Posts

I take the article from RSS feeds, and I am not able to remove this character.

I have tried this iconv( "UTF-8", "ISO-8859-1//IGNORE", $string ), however, I still get Jakarta�s instead of Jakartaâ��s in http://www.indonesiaah.com/articles/destinations/3/jakarta%C3%A2%EF%BF%BD%EF%BF%BDs-neo-gothic-catholic-cathedral-.htm.

 

Does anyone have the solution for this problem?

 

Thank you.

The question was what RSS feed you're using.

 

Their data is corrupt. You can't really recover from that.

However it looks like they meant to use an apostrophe there; figure out the exact value of the bytes there (shown as "�" - bin2hex can help) and do an str_replace() to put in a proper apostrophe.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.