tags:

views:

41

answers:

0

Hi All ,

I am trying to validate a object in LDAP(IBM TDS) which has some attribute defined with non-ascii value , with wildcard search . The following piece of code fails .

    String[] attrIDs = {"emailid"};

    SearchControls ctls = new SearchControls();
    ctls.setReturningObjFlag(true);
    ctls.setSearchScope(SearchControls.OBJECT_SCOPE);
    ctls.setReturningAttributes(attrIDs);

    String userDN="cn=变化变化,cn=users,dc=gaurav,dc=com";
    String searchFilter = "(cn=变化*)";     
    //String searchFilter = "(cn=变化变化)" // without wildcard , it works fine . 

    userEntry = ctx.search(userDN, searchFilter, ctls); //ctx is a object of DirContext

but if I try the above with "cn" attribute having a ascii value , it works fine , with and without wild card .

Any Suggestions ?