From:             spam2 at rhsoft dot net
Operating system: 
PHP version:      5.4.10
Package:          Scripting Engine problem
Bug Type:         Bug
Bug description:PHP 5.4 BREAKS get_html_translation_table()

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
(
    ["] => "
    [&] => &
    ['] => '
    [<] => &lt;
    [>] => &gt;
)
_________________________________________________________________________

PHP 5.3:

php -r "print_r(get_html_translation_table(HTML_ENTITIES, ENT_QUOTES,
'ISO8859-1'));"
Array
(
    [ ] => &nbsp;
    [¡] => &iexcl;
    [¢] => &cent;
    [£] => &pound;
    [¤] => &curren;
    [Â¥] => &yen;
    [¦] => &brvbar;
    [§] => &sect;
    [¨] => &uml;
    [©] => &copy;
    [ª] => &ordf;
    [«] => &laquo;
    [¬] => &not;
    [­] => &shy;
    [®] => &reg;
    [¯] => &macr;
    [°] => &deg;
    [±] => &plusmn;
    [²] => &sup2;
    [³] => &sup3;
    [´] => &acute;
    [µ] => &micro;
    [¶] => &para;
    [·] => &middot;
    [¸] => &cedil;
    [¹] => &sup1;
    [º] => &ordm;
    [»] => &raquo;
    [¼] => &frac14;
    [½] => &frac12;
    [¾] => &frac34;
    [¿] => &iquest;
    [À] => &Agrave;
    [Á] => &Aacute;
    [Â] => &Acirc;
    [Ã] => &Atilde;
    [Ä] => &Auml;
    [Å] => &Aring;
    [Æ] => &AElig;
    [Ç] => &Ccedil;
    [È] => &Egrave;
    [É] => &Eacute;
    [Ê] => &Ecirc;
    [Ë] => &Euml;
    [Ì] => &Igrave;
    [Í] => &Iacute;
    [Î] => &Icirc;
    [Ï] => &Iuml;
    [Ð] => &ETH;
    [Ñ] => &Ntilde;
    [Ò] => &Ograve;
    [Ó] => &Oacute;
    [Ô] => &Ocirc;
    [Õ] => &Otilde;
    [Ö] => &Ouml;
    [×] => &times;
    [Ø] => &Oslash;
    [Ù] => &Ugrave;
    [Ú] => &Uacute;
    [Û] => &Ucirc;
    [Ü] => &Uuml;
    [Ý] => &Yacute;
    [Þ] => &THORN;
    [ß] => &szlig;
    [à] => &agrave;
    [á] => &aacute;
    [â] => &acirc;
    [ã] => &atilde;
    [ä] => &auml;
    [Ã¥] => &aring;
    [æ] => &aelig;
    [ç] => &ccedil;
    [è] => &egrave;
    [é] => &eacute;
    [ê] => &ecirc;
    [ë] => &euml;
    [ì] => &igrave;
    [í] => &iacute;
    [î] => &icirc;
    [ï] => &iuml;
    [ð] => &eth;
    [ñ] => &ntilde;
    [ò] => &ograve;
    [ó] => &oacute;
    [ô] => &ocirc;
    [õ] => &otilde;
    [ö] => &ouml;
    [÷] => &divide;
    [ø] => &oslash;
    [ù] => &ugrave;
    [ú] => &uacute;
    [û] => &ucirc;
    [ü] => &uuml;
    [ý] => &yacute;
    [þ] => &thorn;
    [ÿ] => &yuml;
    [&] => &amp;
    ["] => &quot;
    ['] => &#039;
    [<] => &lt;
    [>] => &gt;
)


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 bug report at https://bugs.php.net/bug.php?id=64011&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=64011&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=64011&r=trysnapshot53
Try a snapshot (trunk):     
https://bugs.php.net/fix.php?id=64011&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=64011&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=64011&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=64011&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=64011&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=64011&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=64011&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=64011&r=notwrong
Not enough info:            
https://bugs.php.net/fix.php?id=64011&r=notenoughinfo
Submitted twice:            
https://bugs.php.net/fix.php?id=64011&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=64011&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64011&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=64011&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=64011&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=64011&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=64011&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=64011&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=64011&r=mysqlcfg

Reply via email to