Subject Re: getting rid of case distinction and accents
Author rrokytskyy
Hi,

Try running your query in isql. If it considers secondary and
tertiary differences, then this is a question to IB-Support,
otherwise - here :)

Type 4 JDBC driver has connection property lc_ctype to specify the
connection encoding to use, possible values of this property are the
same as Firebird encodings. InterClient uses charSet property and
values are encodings from Java language specs (firebird: WIN1252,
interclient: Cp1252).

Also, I think it would be nice if you create a small program
(preferably junit test case) that demostrates the problems you
experience.

Best regards,
Roman Rokytskyy

--- In Firebird-Java@y..., Adriano Rodrigues Ferreira <ferreira@t...>
wrote:
>
> 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'.
>
> If the problem is only to get rid of case sensitivity, something
like
>
> String sql = "select code, description from table where upper
(description) = ?";
> PreparedStatement stmt = con.prepareStatement(sql);
> stmt.setString(1, user_input.toUpperCase());
>
> works. This way, both Java and FireBird are ready to ignore case
distinctions (obviously provided that the column
> 'description' has been defined with a sensible character set and
collation order, like ISO8859_1 and PT_PT).
> But I cannot figure how to do it to consider only primary
differences (a and b) but not secondary (a and A) and
> tertiary (a and ã).
>
> This has nothing to do with FireBird-java? With the JDBC driver
specifically not. But where would I find more FireBird-
> interested Java programmers in a single place? How does FireBird-
Java driver supports this? Sorry if you find
> my question a distraction amid the main stream of this mailing list.
>
> Thanks for any hint.
>
> Adriano R. Ferreira