In a dotless-I locale, we might meet an 'i' before we meet a byte with
the high bit set, in which case we still want the ldb casefold
comparison.
Many ldb operations will do some case-folding before getting here, so
hitting this might be quite rare even in those locales.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15637
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* never appear in multibyte sequences */
if (((unsigned char)s1[0]) & 0x80) goto utf8str;
if (((unsigned char)s2[0]) & 0x80) goto utf8str;
- if (toupper((unsigned char)*s1) != toupper((unsigned char)*s2))
+ if (ldb_ascii_toupper(*s1) != ldb_ascii_toupper(*s2)) {
break;
+ }
if (*s1 == ' ') {
while (n1 > 1 && s1[0] == s1[1]) { s1++; n1--; }
while (n2 > 1 && s2[0] == s2[1]) { s2++; n2--; }
+++ /dev/null
-^ldb.python.api.tr.api.SearchTests.test_subtree_uniquer_elsewhere.none
-^ldb.python.api.tr.api.SearchTestsLmdb.test_subtree_uniquer_elsewhere.none