Comparing and sorting Strings might not work out like you expected specially when your dealing with a language other than English.
Normally comparing strings in done with simple Unicode ordering. If you want to have localized ordering (the kind expected by an end user) you need to use a Collator.
Commonly used String methods such as:
can have unexpected result depending on the context you’re using them. The reason is that programmers tend to apply them to tasks they really aren’t meant for, simply out of habit.
The fundamental difference is that localized comparison depends on Locale, while String is largely ignorant of Locale.
The only robust way of doing localized comparison or sorting of Strings, in the manner expected by an end user, is to use a Collator, not the methods of the String class.