#23449 [Opn->Asn]: htmlentities encodes U+2225 and friends incorrectly
| From: | moriyoshi@php.net | Date: | Fri, 02 May 2003 10:58:33 +0000 |
| Subject: | #23449 [Opn->Asn]: htmlentities encodes U+2225 and friends incorrectly | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-38941@lists.php.net to get a copy of this message | ||
ID: 23449
Updated by: moriyoshi@php.net
Reported By: brofield at jellycan dot com
-Status: Open
+Status: Assigned
Bug Type: Strings related
Operating System: windows 2000
PHP Version: 4.3.1
-Assigned To:
+Assigned To: moriyoshi
New Comment:
Verified.
Previous Comments:
------------------------------------------------------------------------
[2003-05-02 05:30:39] brofield at jellycan dot com
For some reason the summary got changed. Changed it back.
------------------------------------------------------------------------
[2003-05-02 05:28:53] brofield at jellycan dot com
Calling syntax is...
$str = htmlentities( "string containing U+2225", ENT_QUOTES, "utf-8"
);
Other incorrect conversions seem to abound...
$str = ctwEncodeUtf8(
"∥∦∧∨∩∪∫" );
echo $str.'<br>';
$str = htmlentities( $str, ENT_QUOTES, "utf-8" );
echo $str.'<br>';
echo htmlentities( $str, ENT_QUOTES, 'utf-8' ).'<br>';
exit;
Note: ctwEncodeUtf8 is the same function as found at
http://www.zend.com/codex.php?id=838&single=1
Results:
a∦ÈÉ¿¾ç
¿¾çÉ¿¾ç
∩∪∫É¿¾ç
The first and second lines should be the same.
------------------------------------------------------------------------
[2003-05-02 05:21:18] brofield at jellycan dot com
There seems to be a bug in htmlentities() utf-8 conversion. The unicode
character U+2225 a gets converted into ∩ which is the html entity
for the unicode character U+2229 ¿. It should be using ∥ to get
the correct symbol.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23449&edit=1