Re: Sorting with french characters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



     Check the manual for sort www.php.net/sort -> SORT_LOCALE_STRING
     You would have to pay attention to the current locale -> www.php.net/setlocale
before the actual sort.

hope this solves it,
Catalin


Mathieu Dumoulin wrote:
> 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?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux