If I execute the following statement:
string.Compare(\"mun\", \"mün\", true, CultureInfo.InvariantCulture)
The result is \'-1\', indicating
As I understand this it is still somewhat consistent. When comparing using CultureInfo.InvariantCulture
the umlaut character ü
is treated like the non-accented character u
.
As the strings in your first example obviously are not equal the result will not be 0 but -1 (which seems to be a default value). In the second example Muntelier goes last because t follows c in the alphabet.
I couldn't find any clear documentation in MSDN explaining these rules, but I found that
string.Compare("mun", "mün", CultureInfo.InvariantCulture,
CompareOptions.StringSort);
and
string.Compare("Muntelier, Schweiz", "München, Deutschland",
CultureInfo.InvariantCulture, CompareOptions.StringSort);
gives the desired result.
Anyway, I think you'd be better off to base your sorting on a specific culture such as the current user's culture (if possible).