Forum Moderators: coopster

Message Too Old, No Replies

html_entities_decode not catching rsquo

         

ianevans

7:53 pm on Nov 21, 2004 (gmt 0)

10+ Year Member



$string=html_entity_decode($string,ENT_QUOTES)

...is supposed to turn all entities into their characters, but for some reason it's not changing ’ into a right single quotation mark.

Has anyone come across this?

coopster

3:00 pm on Nov 22, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



’ is not in the translation table [php.net].

Have a look:

<pre> 
<?php
$orig = "I'll change these I'll!";
$a = htmlentities($orig, ENT_QUOTES);
echo "$a\n";
$b = html_entity_decode($a, ENT_QUOTES);
echo $b;
?>
<pre>

ianevans

12:39 am on Nov 23, 2004 (gmt 0)

10+ Year Member



Thanks for the info.