#36495 [NEW]: array_change_key_case problem with utf8

From: Date: Thu, 23 Feb 2006 08:58:29 +0000
Subject: #36495 [NEW]: array_change_key_case problem with utf8
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-93557@lists.php.net to get a copy of this message
From: b dot puttmann at dbap dot de Operating system: Linux PHP version: 4.4.2 PHP Bug Type: Arrays related Bug description: array_change_key_case problem with utf8 Description: ------------ array_change_key_case does not change array keys when utf8 encoded. PHP Version 4.3.10 './configure' '--prefix=/usr/local/php' '--with-config-file-path=/usr/local/apache/conf' '--with-apxs=/usr/local/apache/bin/apxs' '--with-sybase-ct=/opt/sybase' '--with-ldap=/usr' '--with-gdbm=/usr' '--with-dba' '--enable-shmop' '--enable-sysvsem' '--with-gd' '--with-zlib-dir=/usr' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-imap=./imap-patched' '--enable-sockets' '--with-freetype-dir=/usr' '--with-dom' Reproduce code: --------------- Testcase: $test_array = array( "Über" => 1, "über" => 2); print "<pre>";print_r($test_array);print "</pre>"; $test_array = array_change_key_case($test_array,CASE_LOWER); print "<pre>";print_r($test_array);print "</pre>"; Expected result: ---------------- Array ( [Über] => 1 [über] => 2 ) Array ( [über] => 2 ) Actual result: -------------- Array ( [Über] => 1 [über] => 2 ) Array ( [Über] => 1 [über] => 2 ) -- Edit bug report at http://bugs.php.net/?id=36495&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36495&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36495&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36495&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36495&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36495&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36495&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=36495&r=needscript Try newer version: http://bugs.php.net/fix.php?id=36495&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36495&r=support Expected behavior: http://bugs.php.net/fix.php?id=36495&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36495&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36495&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36495&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36495&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36495&r=dst IIS Stability: http://bugs.php.net/fix.php?id=36495&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36495&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36495&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36495&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=36495&r=mysqlcfg

« previous php.bugs (#93557) next »