php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22931 Array Sort/Multisort -> wrong string sorting with special, national characters
Submitted: 2003-03-27 10:16 UTC Modified: 2004-01-30 02:49 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: marek at lewczuk dot com Assigned: moriyoshi (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 5.0.0-dev OS: Linux/Windows
Private report: No CVE-ID: None
 [2003-03-27 10:16 UTC] marek at lewczuk dot com
Sorting an array has a very important bug. If your app is using e.g. ISO-8859-2 charset and strings array use special chars like Ś,Ą... PHP doesn't sort strings which use them. I have tried to use setLocale (setLocale is working correctly with strtoupper, strtolower etc.) but nothing. The problem is also in UTF8 charset. This very serious problem...

Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-27 10:24 UTC] marek at lewczuk dot com
Sorry... I have read about usort and strcoll -> yes it's working with setLocale, but... array_multisort still not working ??
 [2003-03-27 10:47 UTC] moriyoshi@php.net
This may be fixed in PHP5.

 [2004-01-30 02:49 UTC] moriyoshi@php.net
Remember to set your locale correctly.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Aug 14 17:01:30 2024 UTC