I need to compare two strings in German language to check if they are equal and only differ in the use of umlaute. E.g. \"Jörg\" should be the same as \"Joerg\".
So
I had the same issue and found no other solution then replacing them e.g. by a extension. As far as i know there is no "direct" solution for this.
public static string ReplaceUmlaute(this string s)
{
return s.Replace("ä", "ae").Replace("ö", "oe").Replace("ü", "ue").Replace("Ä", "AE").Replace("Ö", "OE").Replace("Ü", "UE");
}
Result:
int compareResult = String.Compare("jörg".ReplaceUmlaute(), "joerg", true, ci); // 0