Thread: Matching Characters in Different Character Sets

Matching Characters in Different Character Sets

From
Charles Tassell
Date:
Hello all,

  I was asked a question that has never come up in any work I've done
with Postgres, so I figured I'd ask the list. :)  Is it possible to
configure Postgres to translate locale specific characters when doing
searches (WHERE field ILIKE 'somestring')  Specifically, if I have a
mixed language database of English and French, and I want someone who
types in "ete" to mache "ête" as well as "complete", can that be done
via Postgres, or must it be done on the client side?

  I did a bit of hunting around in the documentation, and it looks like
LC_CTYPE is meant for this sort of thing, but I wasn't able to find any
specifics on how to accomplish this sort of thing.  Also, would I
require locale support in the database, or can you use this with single
byte character set encoding?

  I'd appretiate any pointers anyone out there has on this sort of
thing, thanks. :)