Subject Re: [firebird-support] Re: Character set ISO8859_1 with UPPER function problem
Author Pavel Menshchikov
Hello Vadim,

d> As I've understood Pavel, inline character Firebird functions like
d> UPPER, LOWER etc. should be used like "UPPER(COL1 collate DE_DE)='A'",
d> because the functions don't know how properly convert characters.
That's the problem for stored procedures, as I can see, not for tables
and views if you define collations for their fields (I prefer to use
domains and define collations in them - then you can recreate the
database with another character set and collations via script, for
example).

d> As the result of this problem, I have to locate all such situations in
d> our application and fix them.
d> Our application has a lot of sources - I have to do huge amount of
d> work to locate and fix all problematic situations.
d> And the second problem will appear as soon as our application will
d> start to work in other countries, we have to change all "collate
d> DE_DE" into other collation in all sources for every market.

d> Could you please give me some advice on this problem?
As I understand, it is not recommended to use selectable stored
procedures in the way you do: it is recommended to restrict the
procedure output and order the data inside the procedure, otherwise FB
has to retrieve all rows from the SP, and then filter and order them.
And inside the SP you could use UPPER, etc. without problems if you
defined collations for tables fields.

d> Maybe there is the way to setup one collation order for all objects in
d> database?
Probably changing the system tables directly, but it may be unsafe.


HTH
--
Best regards,
Pavel Menshchikov
http://www.ls-software.com