I've been given an array that needs to be sorted by its key (associative array), and it may have some accented characters in it (à, è, ì, etc.). If it helps any, I do know the language that will be used, so I should be able to set a locale in theory. So, my original theory was to do it like so:
setlocale(LC_COLLATE, 'fre');
ksort($array, SORT_LOCALE_STRING);
This doesn't appear to change the way ksort works at all - Accented characters are always last alphabetically when i'd think they should at least come after regular characters. For instance, 'èvery' would come after 'every', but not after 'fair'. So, then I started to look into collator but couldn't find a way to sort by the array keys. If anyone has any ideas it would be greatly appreciated.