title: How to do a case-sensitive search on an LDAP server (with examples)
body: <p>Can someone please provide or point me to an example(s) of doing case sensitive searches on an LDAP server?</p>
  
  <p>I have found some questions that point me in the right direction, e.g.
  <a href="https://stackoverflow.com/questions/11448822/microsoft-ldap-schema-case-sensitive">Microsoft LDAP schema case sensitive</a></p>
  
  <p>However, when I try doing a search on a custom attribute in my directory, it doesn't seem to work for me.</p>
  
  <p>e.g. <code>(CustomAttribute:caseExactMatch:=Foo)</code> does not match any entries, even though I know that they exist, i.e. if I search for <code>(CustomAttribute:=Foo)</code>, I get entries FOO, Foo and foo returned. (Note that this is a simplified/sanitized version of my actual search)</p>
  
  <p>Am I doing something wrong? Thanks for any pointers or tips.</p>
  
  <p>PS: I have read this Google search result: <a href="http://www.ldapguru.info/ldap/mastering-ldap-search-filters.html" rel="nofollow noreferrer">http://www.ldapguru.info/ldap/mastering-ldap-search-filters.html</a></p>
  
  <p>Which says:</p>
  
  <blockquote>
    <p>The above filter will match "User.0" but not "user.0". Some broken directory servers do not fully implement the LDAP standards and do not support this useful capability.</p>
  </blockquote>
  
  <p>Perhaps my directory is one of these, or am I just messing up my search?</p>