From: f4ckm5 at web dot de
Operating system: Windows
PHP version: 5.2.9
PHP Bug Type: Strings related
Bug description: html_entity_decode not covering Z/z with caron for
Windows-1252
Description:
------------
html_entity_decode should decode "LATIN CAPITAL LETTER Z WITH CARON"
Ž Ž Ž to (int)142, hex(8E) for Windows-1252
html_entity_decode should decode "LATIN SMALL LETTER Z WITH CARON"
ž ž ž to (int)158, hex(9E) for Windows-1252
htmlentities should encode the respective characters to Ž and ž
(ž and Ž is not well supported by most browsers)
Reproduce code:
---------------
var_dump(html_entity_decode("Ž", ENT_QUOTES, "Windows-1252"));
var_dump(html_entity_decode("Ž", ENT_QUOTES, "Windows-1252"));
var_dump(html_entity_decode("Ž", ENT_QUOTES, "Windows-1252"));
var_dump(html_entity_decode("ž", ENT_QUOTES, "Windows-1252"));
var_dump(html_entity_decode("ž", ENT_QUOTES, "Windows-1252"));
var_dump(html_entity_decode("ž", ENT_QUOTES, "Windows-1252"));
var_dump(htmlentities(chr(142), ENT_QUOTES, "Windows-1252", true));
var_dump(htmlentities(chr(158), ENT_QUOTES, "Windows-1252", true));
Expected result:
----------------
string(1) ""
string(1) ""
string(1) ""
string(1) ""
string(1) ""
string(1) ""
string(6) "Ž"
string(6) "ž"
Actual result:
--------------
string(8) "Ž"
string(6) "Ž"
string(7) "Ž"
string(8) "ž"
string(6) "ž"
string(7) "ž"
string(1) ""
string(1) ""
--
Edit bug report at http://bugs.php.net/?id=47798&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=47798&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=47798&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=47798&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=47798&r=fixedcvs
Fixed in CVS and need be documented:
http://bugs.php.net/fix.php?id=47798&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=47798&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=47798&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=47798&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=47798&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=47798&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=47798&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=47798&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=47798&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=47798&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47798&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=47798&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=47798&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=47798&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=47798&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=47798&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=47798&r=mysqlcfg