LDAPSoft LDAP And Active Directory Tools Community Forums
Search
Register
/
Login
Ldap search with parentheses in the search input
Forum Index
»
General Discussion
Author
Message
26/08/2013 08:58:04
Subject:
Ldap search with parentheses in the search input
james
Joined: 06/08/2008 08:12:12
Messages: 5
Offline
What we encountered today involves the usage of open / close parentheses which are wrapped around the area code.
The error received is ---
Filter Error
LDAPLocalException: The invalid character "(" needs to be escaped as "\28" (87) Filter Error
What is the correct way to format a text search for a phone number that begins (794)?
Thank you in advance for your time and assistance
26/08/2013 09:19:40
Subject:
Re:Ldap search with parentheses in the search input
support
Joined: 27/06/2008 19:01:18
Messages: 123
Offline
Open and close parentheses needed to be escaped with \28 and \29, respectively. To query homePhone (771) 877-1910 please format the query such as:
(homePhone=\28771\29877-1910)
and with SQL:
select * from ou=People,dc=test,dc=com where homePhone= '\28771\29877-1910'
Thanks
LDAPSoft Support
28/08/2013 12:21:24
Subject:
Re:Ldap search with parentheses in the search input
james
Joined: 06/08/2008 08:12:12
Messages: 5
Offline
One other question of a related manner. Do you have a listing/link of the escape codes and the values they represent that you would send us?
Thank you.
28/08/2013 14:07:13
Subject:
Re:Ldap search with parentheses in the search input
support
Joined: 27/06/2008 19:01:18
Messages: 123
Offline
You may have to look a the LDAP specifications to find out the escape code.
Here is the link to the specification, search for parenthesis and look at the example for equivalent codes for start and end parenthesis.
(o=Parens R Us \28for all your parenthetical needs\29)
http://tools.ietf.org/html/rfc4515
Thanks
Support
Forum Index
»
General Discussion
Go to:
Select a forum
General Discussion
Feature Requests
Report Bugs
Official Bug List [read only]
Recent Topics
Hottest Topics
Member Listing
Powered by
JForum 2.1.9
©
JForum Team