Subject Re: Problems using LIKE with UNICODE
Author pavel_menshchikov
Hi!
--- In firebird-support@yahoogroups.com, "peter_jacobi.rm"
<peter_jacobi@g...> wrote:
> Hi Pavel,
> "pavel_menshchikov" <mpn2001@y...> wrote:
> [...]
> > SET NAMES UNICODE_FSS;
> [...]
> > DEFAULT CHARACTER SET UNICODE_FSS;
> [...]
> > SELECT * FROM ROOMS WHERE NAME LIKE 'string_in_russian%'
> [...]
> > SELECT * FROM ROOMS WHERE UPPER(NAME) LIKE UPPER
('STRING_IN_RUSSIAN%')
>
> Unfortunately, you are on the hurting side of two FB bugs here.
> In addition, there may be a misunderstanding about the use of
> 'SET NAMES'.
> 0. SET NAMES
> Are you using ISQL under Win32? If not please specify.
> Assuming using ISQL under Win32, it is important to note,
> that 'SET NAMES' only tells FB server, how the bytes in
> character strings should be interpreted. So
> SET NAMES UNICODE_FSS tells FB server, that you send UTF-8
> character strings. But your Win32 console most likely is
> not using UTF-8 as input and output codepage.

I use IBExpert (you see its output above [metadata extraction]) and
my program to access the database and to modify it. I have no
problems with console, i have problems with queries, which cannot
fetch correct data :)

> 1. Uppercasing in UTF-8 (UNICODE_FSS)
> Only works for 'a'-'z'. This is a known and registered bug.
> Only workaround is temporarily casting to WIN1251 and uppercasing
> there.

It's not good :( Does anyone know why this bug cannot be fixed so
long?

Best regards,
Pavel