ID:              28042
 User updated by: ben at csgb dot de
-Summary:         greek letters in html to entitity mapping not correct
 Reported By:     ben at csgb dot de
 Status:          Closed
 Bug Type:        Strings related
 PHP Version:     all
 New Comment:

fixing summary line for better search results (entitity -> entity)


Previous Comments:
------------------------------------------------------------------------

[2004-04-18 01:10:02] [EMAIL PROTECTED]

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.



------------------------------------------------------------------------

[2004-04-18 01:09:52] [EMAIL PROTECTED]

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

------------------------------------------------------------------------

[2004-04-17 21:52:26] ben at csgb dot de

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)

------------------------------------------------------------------------

[2004-04-17 21:38:13] 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:
----------------
&Xi;&Pi;&Phi;&Chi;&Psi; &xi;&pi;&phi;&chi;&psi;

Actual result:
--------------
&X1;&P1;&Ph1;&Ch1;&Ps1; &x1;&p1;&ph1;&ch1;&ps1;


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=28042&edit=1

Reply via email to