Subject Re: How to specify which UPPER() to be called
Author peter_jacobi.rm
Hi Helen, all,

--- In firebird-support@yahoogroups.com, Helen Borrie:
> select c from t where UPPER(c) = UPPER( _ISO8859_1 'Füße');

I've found out the fundamental problem with that one (beside
the problem that collation de_de must be specified too):

_ISO8859_1'Füße' doesn't transliterate but re-interprets the
bytes between the quotes according to 8859-1. And because
cp437 ü is the byte 0x81, which is a a C1 control in 8859-1,
a very different string than intended is created.

To generated a ISO8859-1 encoded string 'Füße' you would have
to type <F>-<SUPERSCRIPT LATIN SMALL LETTER N>-<UPPER HALF BLOCK>-<e>
between the quotes. Possible, but rather strange.

From your tips and further readings I arrived at:
SQL> select c from t
CON> where UPPER(c) = UPPER (
CON> CAST ('Füße' AS CHAR(30) character set ISO8859_1)
CON> collate de_de
CON> );

This is a bit longer than expected but works fine.

From all the tests, discussions and reading about the
subject, I'm on the impression that Firebird's reluctance
to uppercase 'ü' to 'Ü' must be considered defective
behaviour. In the vast majority of cases uppercasing is
independant on locale (collation) and should never depend
on the character set (which is a rather immaterial point as
there are hardly ever character sets sharing a collation
in Firebird). The only exceptions I'm aware of, is the
disappearing of accents when uppercasing French and the
uppercasing of 'i' in Turkish.

Best Regards,
Peter Jacobi