Closed GoogleCodeExporter closed 9 years ago
Copied from PHP docs for html_entity_decode:
:::::::
Note: You might wonder why trim(html_entity_decode(' ')); doesn't reduce the
string to an empty string, that's because the ' ' entity is not ASCII code 32
(which is stripped by trim()) but ASCII code 160 (0xa0) in the default ISO
8859-1
characterset.
:::::::
' ' is not replaced with a space by html_entity_decode so we need to replace
the
characters that are added with a space. The ASCII 160 character makes sense but
I'm
not entirely sure how the ASCII 194 character appears. See
'monarch-server/temp.php'
(newest version).
Original comment by andrewps...@gmail.com
on 13 Apr 2009 at 11:35
So what's it replace with? I saw it being converted to a space in the page
source. So it looks like a space but really isn't?
// works
echo strtotime(str_replace(' ', '', $result[1][0]));
// fails
echo strtotime(str_replace(' ', '', html_entity_decode($result[1][0])));
Original comment by tokyotech
on 14 Apr 2009 at 12:08
I have seen a weird character (rectangle with numbers in it) in the string
outputted
by html_entity_decode. I think the simple hack of replacing is the best we
can
do right now.
Original comment by andrewps...@gmail.com
on 16 Apr 2009 at 1:39
hacked with only replacement.
Original comment by tokyotech
on 20 Apr 2009 at 5:56
Original issue reported on code.google.com by
tokyotech
on 13 Apr 2009 at 6:24