the182guy Posted December 19, 2008 Share Posted December 19, 2008 Hi all, My PHP script takes an RSS feed URL and parses the content to the database. I am using simplexml_load_string to parse the XML string to a DOM. The problem is the RSS feed could be any encoding.. UTF-8, ISO etc. I want to be able to pass my XML string through something that will decode all those symbols and encodings to normal characters. Anyone know of a function for this? I've been searching for ages ??? Cheers Link to comment https://forums.phpfreaks.com/topic/137625-decode-xml-characters-from-rss-xml-document/ Share on other sites More sharing options...
sloth456 Posted December 19, 2008 Share Posted December 19, 2008 umm there are several decode functions like utf8_decode() etc. If there's a way you can parse out the type of encoding, then just use an if statement that says if it's UTF8 use this decoding method, it it's ISO do this, etc. Link to comment https://forums.phpfreaks.com/topic/137625-decode-xml-characters-from-rss-xml-document/#findComment-719668 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.