Subject Re: Problem with CONTAINING and COLLATE
Author Dmitry Yemanov
08.12.2017 13:56, Mark Rotteveel wrote:

>> Because you are sending queries in connection charset. And string
>> literals in them are
>> in connection charset. Because of that your 'x' cannot have COLLATE
>> PXW_HUNDC.
>
> I don't agree with this. The string literal is in the connection
> character set, but the value should be converted to the target character
> set (of the column) for the comparison, and that target character set
> does know PXW_HUNDC.
>
> Right now, it looks like instead Firebird only tries to apply the target
> collation, and not the target character set.

In the Firebird grammar, COLLATE has a higher priority than comparison
operators. So it's parsed as "A CONTAINING (B COLLATE C)". B has charset
UTF8 and collation C doesn't belong here.


Dmitry