@@ -618,21 +618,33 @@ if (l1 == 0 || l2 == 0 || c1 > 0x10FFFF || c2 > 0x10FFFF) @throw [OFInvalidEncodingException newWithClass: isa]; if (c1 >> 8 < OF_UNICODE_CASEFOLDING_TABLE_SIZE) { - tmp = of_unicode_casefolding_table[c1 >> 8][c1 & 0xFF]; + if (of_unicode_casefolding_table[c1 >> 8] == NULL) + c1 += of_unicode_lower_table[c1 >> 8] + [c1 & 0xFF]; + else { + tmp = of_unicode_casefolding_table[c1 >> 8] + [c1 & 0xFF]; - if (tmp != 0) - c1 = tmp; + if (tmp != 0) + c1 = tmp; + } } if (c2 >> 8 < OF_UNICODE_CASEFOLDING_TABLE_SIZE) { - tmp = of_unicode_casefolding_table[c2 >> 8][c2 & 0xFF]; + if (of_unicode_casefolding_table[c2 >> 8] == NULL) + c2 += of_unicode_lower_table[c2 >> 8] + [c2 & 0xFF]; + else { + tmp = of_unicode_casefolding_table[c2 >> 8] + [c2 & 0xFF]; - if (tmp != 0) - c2 = tmp; + if (tmp != 0) + c2 = tmp; + } } if (c1 > c2) return OF_ORDERED_DESCENDING; if (c1 < c2)