Bug #64011 [Opn->Ver]: PHP 5.4 BREAKS get_html_translation_table()
| From: | cataphract@php.net | Date: | Fri, 18 Jan 2013 09:55:48 +0000 |
| Subject: | Bug #64011 [Opn->Ver]: PHP 5.4 BREAKS get_html_translation_table() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-176090@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=64011&edit=1
ID: 64011
Updated by: cataphract@php.net
Reported by: spam2 at rhsoft dot net
Summary: PHP 5.4 BREAKS get_html_translation_table()
-Status: Open
+Status: Verified
Type: Bug
Package: Scripting Engine problem
PHP Version: 5.4.10
-Assigned To:
+Assigned To: cataphract
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2013-01-17 15:34:32] spam2 at rhsoft dot net
Description:
------------
the 5.4 return value can not be seriously
hopefully at least "Returns the translation table used by
htmlspecialchars() and htmlentities()" is NOT true
however, this breaks dialogs for special chars using
this table and insert the enitity in the HTML code
realize that not every page out there is UTF8 and never will be
_________________________________________________________________________
PHP 5.4:
php -r "print_r(get_html_translation_table(HTML_ENTITIES, ENT_QUOTES,
'ISO8859-1'));"
Array
(
["] => "
[&] => &
['] => '
[<] => <
[>] => >
)
_________________________________________________________________________
PHP 5.3:
php -r "print_r(get_html_translation_table(HTML_ENTITIES, ENT_QUOTES,
'ISO8859-1'));"
Array
(
[Â ] =>
[¡] => ¡
[¢] => ¢
[£] => £
[¤] => ¤
[Â¥] => ¥
[¦] => ¦
[§] => §
[¨] => ¨
[©] => ©
[ª] => ª
[«] => «
[¬] => ¬
[Â] => ­
[®] => ®
[¯] => ¯
[°] => °
[±] => ±
[²] => ²
[³] => ³
[´] => ´
[µ] => µ
[¶] => ¶
[·] => ·
[¸] => ¸
[¹] => ¹
[º] => º
[»] => »
[¼] => ¼
[½] => ½
[¾] => ¾
[¿] => ¿
[Ã] => À
[Ã] => Á
[Ã] => Â
[Ã] => Ã
[Ã] => Ä
[Ã
] => Å
[Ã] => Æ
[Ã] => Ç
[Ã] => È
[Ã] => É
[Ã] => Ê
[Ã] => Ë
[Ã] => Ì
[Ã] => Í
[Ã] => Î
[Ã] => Ï
[Ã] => Ð
[Ã] => Ñ
[Ã] => Ò
[Ã] => Ó
[Ã] => Ô
[Ã] => Õ
[Ã] => Ö
[Ã] => ×
[Ã] => Ø
[Ã] => Ù
[Ã] => Ú
[Ã] => Û
[Ã] => Ü
[Ã] => Ý
[Ã] => Þ
[Ã] => ß
[Ã ] => à
[á] => á
[â] => â
[ã] => ã
[ä] => ä
[Ã¥] => å
[æ] => æ
[ç] => ç
[è] => è
[é] => é
[ê] => ê
[ë] => ë
[ì] => ì
[Ã] => í
[î] => î
[ï] => ï
[ð] => ð
[ñ] => ñ
[ò] => ò
[ó] => ó
[ô] => ô
[õ] => õ
[ö] => ö
[÷] => ÷
[ø] => ø
[ù] => ù
[ú] => ú
[û] => û
[ü] => ü
[ý] => ý
[þ] => þ
[ÿ] => ÿ
[&] => &
["] => "
['] => '
[<] => <
[>] => >
)
Test script:
---------------
php -r "print_r(get_html_translation_table(HTML_ENTITIES, ENT_QUOTES,
'ISO8859-1'));"
Expected result:
----------------
the full entity table like it worked for many years
Actual result:
--------------
a crippled array
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=64011&edit=1