[Zope] Accentuation with ZCatalog...

Tino Wildenhain tino@wildenhain.de
Tue, 10 Apr 2001 15:32:08 +0200


Hi After,

as Chris sayd;
I think the easyst solution for you would be to create a method
like this for your document objects:

def PrincipiaSearchSource(self):
	return(string.translate(self.read(),string.maketrans('=E1=E0=E2=E9=E8=EA','=
aaaeee'))

(self.read() if you derrive from DTML-Document or -Method)

If ZCatalog indexes your document it gets a translated version without
accents obviously.

Use a similar function to translate users input to strings without accents =
too.

HTH
Tino

--On Montag, 9. April 2001 13:11 -0400 Chris McDonough =
<chrism@digicool.com> wrote:

> There's nothing built-in to do this... it would require hand-massaging of
> either the ZCatalog code or your object code.
>
> ----- Original Message -----
> From: "After Dark" <afterz@zipmail.com>
> To: <zope@zope.org>
> Sent: Monday, April 09, 2001 1:08 PM
> Subject: [Zope] Accentuation with ZCatalog...
>
>
> Hello.
>
> I am using ZCatalog to make searches in my site, but I need
> that when I make a search, ZCatalog ignores accentuation.
>
> Example:
>
> PrincipiaSearchSouce: table
> Have to find: t=E1ble, t=E3ble, t=E0ble, table
>
> Is there any property that do that? Or something like...
>
> Thanks.
> ________________________________________________
> Don't E-Mail, ZipMail! http://www.zipmail.com/
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )