Sorting with french characters

From: Date: Thu, 23 Jun 2005 14:37:21 +0000
Subject: Sorting with french characters
Groups: php.general 
Request: Send a blank email to php-general+get-217486@lists.php.net to get a copy of this message
I've got a little problem with the ksort and sort functions. When i fill this array's keys or the array's data and i sort it, i can't seem to get a correct sort order concerning accented french characters. For example: Emiss, Erick Morrison, Phillip Tatey, Peter Zachary, Martin Élement, Marc-André This is the kind of result i get from Ksort when i put these as keys. Notice the "Élement, Marc-André" at the end? Its supossed to be in the "E"s not at the end. So i'm wondering how i can make this work now. I can't afford to make a STR_REPLACE on all possible accents, i got over a thousand records from the database to parse in a fast way and there are at the very least 60 different accents to replace from the A, E, I, O and U without forgetting we have acute, grave, trema, circonflex accents for each letter. :S My guess is there is something in the configuration of my dev server that must do this. Can anyone help me?

« previous php.general (#217486) next »