6.0.0-alpha12
6/7/25

[#2901] International searches (multiple results)
Summary International searches (multiple results)
Queue Turba
Queue Version HEAD
Type Enhancement
State Resolved
Priority 2. Medium
Owners Horde Developers (at)
Requester nospam (at) pablohoffman (dot) com
Created 11/02/2005 (7157 days ago)
Due
Updated 07/19/2007 (6533 days ago)
Assigned 03/28/2006 (7011 days ago)
Resolved 07/19/2007 (6533 days ago)
Milestone
Patch Yes

History
07/19/2007 08:46:50 PM Chuck Hagenbuch Deleted Original Message
 
03/28/2006 02:09:44 PM Jan Schneider Assigned to Horde DevelopersHorde Developers
State ⇒ Assigned
 
11/03/2005 02:53:11 PM Jan Schneider State ⇒ Accepted
 
11/03/2005 02:33:15 PM pablo (at) pablohoffman (dot) com Comment #3 Reply to this comment
This should already work if you specify the LDAP server's charset in
the configuration and use search strings that are compatible to the
used charset.
It's not the same. One thing is the charset you use. I'm using utf-8 
and have turba configured that way, and it's working fine. But look at 
the following scenario:



I have an spanish directory with all the following entries:



cn: Sánchez



cn: Sanchez



cn: Sanchéz





When I look for (cn=Sanchez) I want all of them to be returned since 
that is the way addressbook usually work (ie: ignore accents). But 
it's not working that way. Cause when you seach (cn=Sanchez) it only 
returns the Sanchez entry (not Sánchez nor Sanchéz).



The openldap server (slapd) has an special operator that can match all 
those three entries when you look for "Sanchez". It's called the 
approximate operator and it's used like this: instead of searching for:



(cn=*sanchez*)  ---> returns only Sanchez



you search for:



(cn~=sanchez)   ---> returns Sanchez, Sánchez and Sanchéz



Note the ~= operator and the lack of "*" in the approximate search.





And that's it. The problem is that, since this is not a special match rule

(that would be the ideal solution but there's no standard for it yet) 
you must implement it in the client side and that's what I said it 
would be great to have in turba.



Look at my quick-dirty patch to see how I fixed the problem.



Adding this functionality to turba will involve allowing to configure 
in some way the "operator" you want to use for searches, and that 
should be done in the sources.php file, I think.




11/02/2005 10:59:24 PM Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
This should already work if you specify the LDAP server's charset in 
the configuration and use search strings that are compatible to the 
used charset.
11/02/2005 03:01:26 PM nospam (at) pablohoffman (dot) com Comment #1
Priority ⇒ 2. Medium
Type ⇒ Enhancement
Summary ⇒ International searches (multiple results)
Queue ⇒ Turba
New Attachment: turba-i18n_searches.patch
State ⇒ New
Reply to this comment
It would be great to add support for international searches in turba. 
That is, to search for "Sanchez" and return "Sánchez", "Sanchez", 
"Sanchéz", etc.



In openldap (slapd) this can be achieved using the approximate 
operator ("~=") instead of the usual "=".



Attached is a one-line (very specific) hack to add this functionality 
with current Horde/Turba version, as a proof of concept. Is not a 
generic hack, you must change "cn" to the LDAP attribute you use as 
"name".



Anyway, in case no one is already working on this, I may be available 
to do it. It will involve adding some options to sources.php, I think.



--

Pablo Hoffman

Saved Queries