Monday, 11 August 2014

replace all weird characters in xml to its equivalent 'character reference'



I have an XML which has some characters like,



£ ° /* entity reference aka symbolic character ref */
» & Â • › /* unicode characters */


I want to replace both such characters (entity ref & unicode chars) with their "character references" aka "numeric character ref",



£ - character reference for '£' OR '£'


Is there a php function which does this?


Thanks!


No comments:

Post a Comment