Infotechie
Infotechie

Reputation: 1653

ldapsearch not working with unicode characters in search criteria

I am performing ldapsearch on OpenLdapServer. The search criteria consists of some unicode character like "tépha". When I perform the search using below command

ldapsearch -x -h <ipaddress> -p <port> -b "ou=group, ou=people, dc=company,dc=CR" 
**"cn=*t*"**

It returns one result that is absolutely correct but when I search using below command:

ldapsearch -x -h <ipaddress> -p <port> -b "ou=group, ou=people, dc=company,dc=CR" 
**"cn=*tépha*"** 

It is not returning any result.I have also tried with search criteria "t\E9pha" but no success. I have tried with the OpenLdap "ldapsearch" utility and LdapBrowser as well. Both are not returning the expected result.

Why is it not able to find the entry when search criteria contains the unicode character?

How can I escape the unicode character in the search criteria to get the expected result?

Thanks.

Upvotes: 0

Views: 1018

Answers (1)

Yuvika
Yuvika

Reputation: 6132

I think the string needs to be utf-8 encoded. So try replacing the é with \c3

Upvotes: 0

Related Questions