On Thu, 2002-07-11 at 18:22, Stephan Szabo wrote:
> On Thu, 11 Jul 2002, ktt wrote:
>
> >
> > That's a problem, because I building
> > a UNICODE text database and planning case insensitive
> > search.
>
> You can do case insensitive searches as long as you're
> willing to use something other than var=literal (such
> as tolower(var)=lowerliteral or tolower(var)=tolower(literal)
> or var ILIKE literal).
As was pointed out this will not work in the general case for non-ascii.
I think it is necessary to code an explicit case insensitive and locale
aware string compare function. (the libc strcoll function seems to do
exactly that, except that it seems to be case sensitive, whereas
strncasecomp does not respect the locale, while it knows about charsets
and case).
cheers
-- vbi
--
secure email with gpg http://fortytwo.ch/gpg