Subject | Character set ISO8859_1 with UPPER function problem |
---|---|
Author | dimkraska |
Post date | 2005-05-28T08:21:11Z |
Hi all,
I'm developing the application with the help of Firebird 1.5, Delphi and
FIBPlus.
I've encountered the problem with character set ISO8859_1, stored
procedures and UPPER function.
Our application is for German market, so our database is made with
character set ISO8859_1.
Our application uses the same character set to connect to database.
All operations with database data is OK: inserting, selecting,
ordering and other operations are performing with no problem, except
one special situation.
We have the special Delphi component which creates dynamic SQL queries
depending on the user choice. Then this query is executed and the user
sees the result.
The usual simple query is something like
SELECT * FROM TABLE1 WHERE UPPER(COL1)='AB'
In some situations we need to filter results of stored procedures,
like
SELECT * FROM MY_STORED_PRC(...) WHERE UPPER(COL1)='AB'
The problem is that this query isn't working properly in case the user
wants to filter on German specific letters (Umlauts):
SELECT * FROM MY_STORED_PRC(...) WHERE UPPER(COL1)='ÄÜ'
The result of this query is empty, but it should be not empty because the
stored procedure's result includes the line "äü" for example.
After some experiments I've found that if I change stored procedure to
return the data in uppercase, then the query works properly.
But this solution isn't good for us, because I have to return tha data
from
the database in usual case (not upper case).
Could you please give me some advice on this problem?
Thank you in advance.
Best regards,
Vadim Khrasko
programmer
AVEST plc.
220005, Minsk, Republic of Belarus
I'm developing the application with the help of Firebird 1.5, Delphi and
FIBPlus.
I've encountered the problem with character set ISO8859_1, stored
procedures and UPPER function.
Our application is for German market, so our database is made with
character set ISO8859_1.
Our application uses the same character set to connect to database.
All operations with database data is OK: inserting, selecting,
ordering and other operations are performing with no problem, except
one special situation.
We have the special Delphi component which creates dynamic SQL queries
depending on the user choice. Then this query is executed and the user
sees the result.
The usual simple query is something like
SELECT * FROM TABLE1 WHERE UPPER(COL1)='AB'
In some situations we need to filter results of stored procedures,
like
SELECT * FROM MY_STORED_PRC(...) WHERE UPPER(COL1)='AB'
The problem is that this query isn't working properly in case the user
wants to filter on German specific letters (Umlauts):
SELECT * FROM MY_STORED_PRC(...) WHERE UPPER(COL1)='ÄÜ'
The result of this query is empty, but it should be not empty because the
stored procedure's result includes the line "äü" for example.
After some experiments I've found that if I change stored procedure to
return the data in uppercase, then the query works properly.
But this solution isn't good for us, because I have to return tha data
from
the database in usual case (not upper case).
Could you please give me some advice on this problem?
Thank you in advance.
Best regards,
Vadim Khrasko
programmer
AVEST plc.
220005, Minsk, Republic of Belarus