This can be easily reproduced with:
LC_ALL=tr_TR.UTF-8 make test
If we are searching for DNs, we should enforce the use of the POSIX locale. Only for values we should use the locale set for the system.
Patch will follow.
have in mind that switching locales (to POSIX or whatever) is _not_ the right approach. You should use ASCII aware functions instead of locale aware string functions. toupper() for example is not usable as it make , Samba has strupper_m() instead, which is ASCII proof.
Björn, please be more precise what you want. See my comments in the merge request or create one with code you prefer ...
This bug was referenced in samba master: