@@ -47,14 +47,12 @@ { for (size_t i = 0; i < length; i++) { unsigned char f = first[i]; unsigned char s = second[i]; - if (f <= 0x7F) - f = toupper(f); - if (s <= 0x7F) - s = toupper(s); + f = of_ascii_toupper(f); + s = of_ascii_toupper(s); if (f > s) return OF_ORDERED_DESCENDING; if (f < s) return OF_ORDERED_ASCENDING; @@ -779,11 +777,14 @@ } - (of_comparison_result_t)caseInsensitiveCompare: (OFString*)otherString { const char *otherCString; - size_t i, j, otherCStringLength, minimumCStringLength; + size_t otherCStringLength, minimumCStringLength; +#ifdef OF_HAVE_UNICODE_TABLES + size_t i, j; +#endif int compare; if (otherString == self) return OF_ORDERED_SAME; @@ -851,16 +852,16 @@ return OF_ORDERED_ASCENDING; i += l1; j += l2; } -#endif if (_s->cStringLength - i > otherCStringLength - j) return OF_ORDERED_DESCENDING; else if (_s->cStringLength - i < otherCStringLength - j) return OF_ORDERED_ASCENDING; +#endif return OF_ORDERED_SAME; } - (uint32_t)hash