Subject Re: [Firebird-Java] getting rid of case distinction and accents
Author David Warnock
Adriano,

> In a Java application, accessing a FireBird database how it is
> possible to ignore both case distinction and accents both in Java and
> FireBird. That is, if the user enter in the Java application a string
> like 'acao', he can find 'ação'. He enters 'ácido' and he can find
> 'ACIDO'.

We have solved this problem by having additional columns in our database
design. For each column where we want to do this kind of search we have
a second column where the data is held in UPPERCASE, sometimes without
accents. We use unicode for all our columns and we produce the uppercase
columns in the java code not using database triggers or functions. The
reason is that in some languages they ignore accents when sorting and in
others they do not. Therefore by uing the locale correctly in the java
code we should put the correct value in the UPPERCASE column for this site.

So we always use the UPPERCASE columns for where and order by clauses
but display the normal column to users.

It has worked well for us.

Hope this helps.

David
--
David Warnock, Sundayta Ltd. http://www.sundayta.com
iDocSys for Document Management. VisibleResults for Fundraising.
Development and Hosting of Web Applications and Sites.