#42528 [Opn]: Out of "char"(8-bit) range value doesn't roll back, with uni-code ON.
| From: | mahesh dot vemula at in dot ibm dot com | Date: | Fri, 07 Sep 2007 12:30:29 +0000 |
| Subject: | #42528 [Opn]: Out of "char"(8-bit) range value doesn't roll back, with uni-code ON. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-117275@lists.php.net to get a copy of this message | ||
ID: 42528
User updated by: mahesh dot vemula at in dot ibm dot com
Reported By: mahesh dot vemula at in dot ibm dot com
Status: Open
Bug Type: Performance problem
Operating System: RHEL4
PHP Version: 6CVS-2007-09-03 (CVS)
New Comment:
Samething is happening for strncasecmp() function also.
Previous Comments:
------------------------------------------------------------------------
[2007-09-03 11:53:31] mahesh dot vemula at in dot ibm dot com
Description:
------------
The character(8-bit) range of value does not roll back to the
corresponding minimum value, once the value reaches beyond the range of
a char(8-bit) that it can hold, when Unicode is ON.
Reproduce code:
---------------
--TEST--
--FILE--
<?php
var_dump( decbin( ord(chr(255)) ) );
var_dump( decbin( ord(chr(256)) ) );
var_dump( decbin( ord(chr(257)) ) );
?>
--EXPECTF--
Expected result:
----------------
unicode(8) "11111111"
unicode(1) "0"
unicode(1) "1"
Actual result:
--------------
unicode(8) "11111111"
unicode(9) "100000000"
unicode(9) "100000001"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42528&edit=1