decoding entities in PHP
Posted by John_Moylan (jfp), 29 October 2004Just a quickie.
Post ammeded as YaBB is encoding my text!
*PLEASE NOTE THE THE ENTITES BELOW SHOULD ALL HAVE A LEADING '&' BEFORE THE '#'
Apologies for shouting.
Anyone know how I can decode entites that look like this.
#165; #166; #168; #169;
but it does not decode them.
Posted by Custard (Custard), 29 October 2004Hiya,
Wild stab in the dark (i don't know php very well),
but it isn't something to do with the CHARSET is it?
Perhaps it needs it specified to be able to decode the UTF-8 or whatever correctly?
Also I found this, which may be related.
Posted by John_Moylan (jfp), 29 October 2004Hello Custard.
Yep, seems to be a recognised shortfall of html_entitly_decode.
I tried every varient of available character set's in the hope that even an obscure one would do the job, alas no joy.
Apparently fixed in PHP5 though, so that will help me now won't it
Perhaps I should put off submitting froogle feeds for for a year or two. (that's what it was for)
You know, I really ought to have used Perl for this, but the whole script is now ready and working in PHP. (bar this problem)
Thanks for your input though, I'm off to roll my own entitie decoder since I found the table here [http://www.usresolve.org/character-entities.php]
or should I finish that bottle of red thats calling me from downstairs
Posted by Custard (Custard), 29 October 2004You have a bottle of wine, and you're asking me!
PH: 01144 1225 708225 • FAX: 01144 1225 899360 • EMAIL: email@example.com • WEB: http://www.wellho.net • SKYPE: wellho