From:             geissert at debian dot org
Operating system: Debian GNU/Linux ia64
PHP version:      5.3SVN-2010-02-12 (snap)
PHP Bug Type:     Strings related
Bug description:  strtolower.phpt fails

Description:
------------
The test fails with the latest snapshot, 5.3.1 worked fine

Reproduce code:
---------------
echo "*** Testing strtolower() with all 256 chars ***\n";
for ($i=0; $i<=255; $i++){
  $char = chr($i);
  print(bin2hex($char))." => ".(bin2hex(strtolower("$char")))."\n";
}

Expected result:
----------------
*** Testing strtolower() with all 256 chars ***
00 => 00
01 => 01
02 => 02
03 => 03
04 => 04
05 => 05
06 => 06
07 => 07
08 => 08
09 => 09
0a => 0a
0b => 0b
0c => 0c
0d => 0d
0e => 0e
0f => 0f
...
bf => bf
c0 => c0
c1 => c1
c2 => c2
c3 => c3
c4 => c4
c5 => c5
c6 => c6
c7 => c7
c8 => c8
c9 => c9
ca => ca
cb => cb
cc => cc
cd => cd
ce => ce
cf => cf
d0 => d0
d1 => d1
...


Actual result:
--------------
*** Testing strtolower() with all 256 chars ***
00 => 00
01 => 01
02 => 02
03 => 03
04 => 04
05 => 05
06 => 06
07 => 07
08 => 08
09 => 09
0a => 0a
0b => 0b
0c => 0c
0d => 0d
0e => 0e
0f => 0f
...
bf => bf  // error:
c0 => e0
c1 => e1
c2 => e2
c3 => e3
c4 => e4
c5 => e5
c6 => e6
c7 => e7
c8 => e8
c9 => e9
ca => ea
cb => eb
cc => ec
cd => ed
ce => ee
cf => ef
d0 => f0
d1 => f1
d2 => f2
d3 => f3
d4 => f4
d5 => f5
d6 => f6
d7 => d7
d8 => f8
d9 => f9
da => fa
db => fb
dc => fc
dd => fd
de => fe
df => df
e0 => e0 //the rest is fine
...

-- 
Edit bug report at http://bugs.php.net/?id=51031&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=51031&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=51031&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=51031&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=51031&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=51031&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=51031&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=51031&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=51031&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=51031&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=51031&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=51031&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=51031&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=51031&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=51031&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=51031&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=51031&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=51031&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=51031&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=51031&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=51031&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=51031&r=mysqlcfg

Reply via email to