Subject | Re: [firebird-support] Problem with Sharp s and UNICODE_CI_AI |
---|---|
Author | Stefan Heymann |
Post date | 2013-05-22T12:56:13Z |
OK, I have found a simpler way to show my problem.
Try this on a UTF8 database:
select
case when 'Übergeek' collate unicode_ci_ai like 'ÜB%' collate unicode_ci_ai
then '=' else '<>' end as test_1,
case when 'Übergeek' collate unicode_ci_ai like 'üb%' collate unicode_ci_ai
then '=' else '<>' end as test_2,
case when 'Fußball' collate unicode_ci_ai like 'fu%' collate unicode_ci_ai
then '=' else '<>' end as test_3,
case when 'Fußball' collate unicode_ci_ai like 'fuß%' collate unicode_ci_ai
then '=' else '<>' end as test_4,
case when upper ('Fußball') like upper ('fuß%')
then '=' else '<>' end as test_5
from rdb$database
TEST_4 will show a mismatch, which is wrong.
Is this a bug? What can I do to get a case and accent insensitive
comparison?
Database: Firebird 2.5.2.26540 SuperServer 64-Bit
OS: Windows 7 Pro 64-Bit
Regards
Stefan
Try this on a UTF8 database:
select
case when 'Übergeek' collate unicode_ci_ai like 'ÜB%' collate unicode_ci_ai
then '=' else '<>' end as test_1,
case when 'Übergeek' collate unicode_ci_ai like 'üb%' collate unicode_ci_ai
then '=' else '<>' end as test_2,
case when 'Fußball' collate unicode_ci_ai like 'fu%' collate unicode_ci_ai
then '=' else '<>' end as test_3,
case when 'Fußball' collate unicode_ci_ai like 'fuß%' collate unicode_ci_ai
then '=' else '<>' end as test_4,
case when upper ('Fußball') like upper ('fuß%')
then '=' else '<>' end as test_5
from rdb$database
TEST_4 will show a mismatch, which is wrong.
Is this a bug? What can I do to get a case and accent insensitive
comparison?
Database: Firebird 2.5.2.26540 SuperServer 64-Bit
OS: Windows 7 Pro 64-Bit
Regards
Stefan