Bug #62127 [Opn->Nab]: array_change_key_case first letter
| From: | johannes@php.net | Date: | Thu, 24 May 2012 10:19:50 +0000 |
| Subject: | Bug #62127 [Opn->Nab]: array_change_key_case first letter | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-170765@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=62127&edit=1
ID: 62127
Updated by: johannes@php.net
Reported by: michael at hscbrasil dot com dot br
Summary: array_change_key_case first letter
-Status: Open
+Status: Not a bug
Type: Bug
Package: Arrays related
Operating System: CentOS 5.5
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Set a proper locale using setlocale() also 5.2.10 is out of support for long
Previous Comments:
------------------------------------------------------------------------
[2012-05-23 17:03:50] michael at hscbrasil dot com dot br
Description:
------------
I was trying to use array_change_key_case to convert Array keys to a Lower Case. An error occurs in
keys with accent on the first letter.
PHP Version 5.2.10
Test script:
---------------
$arr = array
(
'Ãltima Atualização' => 'Ãltima Atualização',
'IP' => 'IP',
'Ãnibus' => 'Ãnibus',
'MSN' => 'MSN'
);
print 'normal = '.var_export($arr, true);
print 'lower = '.var_export(array_change_key_case($arr, CASE_LOWER), true);
/*
normal = array (
'Ãltima Atualização' => 'Ãltima Atualização',
'IP' => 'IP',
'Ãnibus' => 'Ãnibus',
'MSN' => 'MSN',
)
lower = array (
'Ãltima atualização' => 'Ãltima Atualização',
'ip' => 'IP',
'Ãnibus' => 'Ãnibus',
'msn' => 'MSN',
)
*/
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=62127&edit=1