#49407 [Opn->Csd]: get_html_translation_table(): it doesn't output table for htmlentities in utf-8
| From: | vrana@php.net | Date: | Fri, 13 Nov 2009 22:38:17 +0000 |
| Subject: | #49407 [Opn->Csd]: get_html_translation_table(): it doesn't output table for htmlentities in utf-8 | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-3151@lists.php.net to get a copy of this message | ||
ID: 49407
Updated by: vrana@php.net
Reported By: thomas at landauer dot at
-Status: Open
+Status: Closed
Bug Type: Documentation problem
Operating System: *
PHP Version: Irrelevant
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
Previous Comments:
------------------------------------------------------------------------
[2009-08-30 19:32:58] jani@php.net
There is no such OS called "All".
------------------------------------------------------------------------
[2009-08-29 18:33:29] thomas at landauer dot at
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 this bug report at http://bugs.php.net/?id=49407&edit=1