I'm seeing something wired when using NSString caseInsensitiveCompare. For below two strings:
NSString *str1 = @"Výkazy do poisťovní";
NSString *str2 = @"Vyšlé faktúry 2007.xls";
I use NSString caseInsensitiveCompare to compare them,
int ci1 = [str1 caseInsensitiveCompare:str2];
int ci2 = [str2 caseInsensitiveCompare:str1];
Since they are different strings, I expect above code should give me 1 and -1. But surprisingly both ci1 and ci2 are 1. How can this happen???
Always use current locale when its a string used for display.