|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-04-17 21:38 UTC] ben at csgb dot de
Description:
------------
the html entity mappings used by htmlentities() have wrong entries in ent_uni_greek[].
They say "P1" and "p1" instead of "Pi" and "pi". The same goes with "Xi", "Phi", "Chi", "Psi" and their lowercase characters.
Reproduce code:
---------------
<?php
echo htmlentities("????? ?????",ENT_COMPAT,"UTF-8");
?>
Expected result:
----------------
ΞΠΦΧΨ ξπφχψ
Actual result:
--------------
&X1;&P1;&Ph1;&Ch1;&Ps1; &x1;&p1;&ph1;&ch1;&ps1;
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 13:00:01 2025 UTC |
retry to post code: <?php echo htmlentities("????? ?????",ENT_COMPAT,"UTF-8"); ?> here is the diff of php-4.3.4/ext/standard/html.c: 139,140c139,140 < "Iota", "Kappa", "Lambda", "Mu", "Nu", "X1", "Omicron", "P1", "Rho", < NULL, "Sigma", "Tau", "Upsilon", "Ph1", "Ch1", "Ps1", "Omega", --- > "Iota", "Kappa", "Lambda", "Mu", "Nu", "Xi", "Omicron", "Pi", "Rho", > NULL, "Sigma", "Tau", "Upsilon", "Phi", "Chi", "Psi", "Omega", 144,145c144,145 < "iota", "kappa", "lambda", "mu", "nu", "x1", "omicron", "p1", "rho", < "sigmaf", "sigma", "tau", "upsilon", "ph1", "ch1", "ps1", "omega", --- > "iota", "kappa", "lambda", "mu", "nu", "xi", "omicron", "pi", "rho", > "sigmaf", "sigma", "tau", "upsilon", "phi", "chi", "psi", "omega", It's the same change in php-5 (with different line numbers)