PHP 4.0 Bug #9671: Sorting arrays with norwegian letters

From: Date: Sat, 10 Mar 2001 12:51:06 +0000
Subject: PHP 4.0 Bug #9671: Sorting arrays with norwegian letters
Groups: php.dev 
Request: Send a blank email to php-dev+get-48579@lists.php.net to get a copy of this message
From: webmaster@sandnessjoen.net Operating system: RedHar 7.0 PHP version: 4.0.4pl1 PHP Bug Type: Arrays related Bug description: Sorting arrays with norwegian letters I think I have found a bug in the function 'sort'. It does not sort correct with norwegian letters. The norwegian alphabeth is made of 29 letters. The three last ones are spesial for norway (and sweden and denmark). Heres a sample of our alphabeth: abcdefghijklmnopqrstuvwxyzæøå And here are some code... <? // List of norwegian names, with norwegian letters $to_be_sorted = array(mamma, øyvind, sondre, værner, ærlend, odd, hedvig, åsmund, birgit); sort($to_be_sorted); for ($i = 0; $i < sizeof($to_be_sorted); $i ++) { echo $to_be_sorted[$i]."<br>\n"; } ?> This prodused this putput: birgit hedvig mamma odd sondre værner åsmund ærlend øyvind But it should have been: birgit hedvig mamma odd sondre værner ærlend øyvind åsmund Yours Håkon Flatøy PS: PHP is GREAT! -- Edit Bug report at: http://bugs.php.net/?id=9671&edit=1

« previous php.dev (#48579) next »