#49407 [NEW]: get_html_translation_table(): it doesn't output table for htmlentities in utf-8
| From: | thomas at landauer dot at | Date: | Sat, 29 Aug 2009 18:33:30 +0000 |
| Subject: | #49407 [NEW]: get_html_translation_table(): it doesn't output table for htmlentities in utf-8 | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-2687@lists.php.net to get a copy of this message | ||
From: thomas at landauer dot at
Operating system: All
PHP version: Irrelevant
PHP Bug Type: Documentation problem
Bug description: get_html_translation_table(): it doesn't output table for htmlentities in
utf-8
Description:
------------
get_html_translation_table(HTML_ENTITIES) lists the tranlation table used
by htmlentities *when no charset parameter is given*.
htmlentities($string, ENT_COMPAT, 'utf-8') encodes more characters than
get_html_translation_table(HTML_ENTITIES) contains!!
So I suggest either:
*) Add a charset parameter to get_html_translation_table() - corresponding
to htmlentities()
Or
*) Correct the documentation. E.g.: get_html_translation_table() will
return the translation table that is used internally for htmlspecialchars()
and htmlentities() when no charset parameter is given. Note: If
htmlentities() is called with a charset parameter, it converts more
characters than get_html_translation_table() shows. Currently, there is no
way to display the translation table which is used in that case.
Reproduce code:
---------------
htmlentities('∫', ENT_COMPAT, 'utf-8'); // returns ∫
print_r(get_html_translation_table(HTML_ENTITIES)); // ∫ is not
listed
--
Edit bug report at http://bugs.php.net/?id=49407&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49407&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49407&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49407&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=49407&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49407&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=49407&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=49407&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=49407&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=49407&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=49407&r=support
Expected behavior: http://bugs.php.net/fix.php?id=49407&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=49407&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=49407&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=49407&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49407&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=49407&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=49407&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=49407&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=49407&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=49407&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=49407&r=mysqlcfg