#38316 [Opn]: html_entity_decode() unexpected results
| From: | raymond at rnamusic dot com | Date: | Thu, 03 Aug 2006 16:28:33 +0000 |
| Subject: | #38316 [Opn]: html_entity_decode() unexpected results | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-100292@lists.php.net to get a copy of this message | ||
ID: 38316
User updated by: raymond at rnamusic dot com
Reported By: raymond at rnamusic dot com
Status: Open
Bug Type: *Languages/Translation
Operating System: Linux
PHP Version: 4.4.3
New Comment:
not your bug submission script translates my example ascii char into an
entity, so where you read "é" should be a sigle ascii character.
fyi.
Previous Comments:
------------------------------------------------------------------------
[2006-08-03 16:27:00] raymond at rnamusic dot com
Description:
------------
In all example code, and in all php functions, I can not find a simple
snipet that will find html enties that are attached to characters (e.g.
"é" a unicode construct) and decode them properly (to
"é").
The string "Japrisot, Sébastien" is just ignored by
html_entity_decode() and returned as is -- nothing changed.
The only solution seems to write a custom replacement function, which
seems a bit odd since html_entity_decode purports to decode common
entities.
If you work with marc records, as I do you come across these entities
all the time.
Reproduce code:
---------------
<?php
$string = "Japrisot, Sébastien";
$decoded = html_entity_decode($string);
echo $decoded;
?>
Expected result:
----------------
Japrisot, Sébastien
Actual result:
--------------
Japrisot, Sébastien
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38316&edit=1