[Zope] searching with foreign characters in the ZCatalog
dieter at handshake.de
Thu Oct 11 14:39:35 EDT 2007
Wohnlich, Eric (IMS) wrote at 2007-10-10 15:42 -0400:
>As far as I can tell, using any of the default index types that come with Zope 2 (FieldIndex, TextIndex, whatever) if you do a search for "Jurgen" it will not match "Jürgen". In my opinion, this is correct - "Jurgen" is spelled incorrectly.
There are two ways to handle this:
* either by normalization: you transform your words into a normal
form and index this.
You make the same normalization for search terms.
This way, any two search terms with the same normalization
In your case, your normalization could replace "ü" by "u".
* by an expansion of your search terms to search as well
for "similar" words.
This technique is often used to search for words that sound
similarly but can be used for other purposes as well.
Applied to your case: when someone searches for "Jurgen"
you would effectively replace it with "Jurgen or Jürgen".
More information about the Zope