Subject Re: BLOB SUB_TYPE 1 + using CONTAINING with LC_TYPE=WIN1250
Author b0bik2000
It is working : ) Thank you very much for this tips.

b

--- In firebird-support@yahoogroups.com, Milan TomeĀš - Position <tomes@...> wrote:
>
> Hi,
>
> AFAIK you can use this
>
> SELECT * FROM T1 WHERE BLBFIELD CONTAINING _UTF8'text_in_utf8'
>
> but you have to use static text next to _UTF8 not a parameter.
>
> M. Tomes
>
>
> Dne 19.03.2010 20:55, b0bik2000 napsal(a):
> >
> > Hello, I have a problem:
> >
> > FB 2.0.3, ODS 11
> >
> > I have a BLOB SUB_TYPE 1 CHARSET UTF8 field. Data are stored in UTF8
> > format. In client application (IBX) I'm using connection Params:
> >
> > LC_TYPE=WIN1250
> >
> > Question: is there a way to execute such a query:
> >
> > SELECT * FROM T1 WHERE BLBFIELD CONTAINING :PARAMVALUE
> >
> > passing string in UTF format ? Or how to disable conversion (I guess
> > there is a conversion WIN1250 -> UTF8) passing param value ?
> >
> > If I drop
> >
> > LC_TYPE=WIN1250
> >
> > from connection params, query works fine.
> >
> > There is something else. Previously the column was declared as:
> >
> > BLBFIELD BLOB SUB_TYPE 1 CHARSET WIN1250
> >
> > later we decided to store in that column values in UTF8 format. After
> > that I make some alters:
> >
> > ALTER TABLE T1 ADD BLBFIELD_N BLOB SUB_TYPE 1 CHARSET NONE
> >
> > UPDATE T1 SET BLBFIELD_N = BLBFIELD -- transfer UTF8 values into _N field
> >
> > ALTER TABLE T1 DROP BLBFIELD
> >
> > ALTER TABLE T1 ADD BLBFIELD BLOB SUB_TYPE 1 CHARSET UTF8
> >
> > UPDATE T1 SET BLBFIELD = BLBFIELD_N -- transfer UTF8 values into
> > original column, but with correct CHARSET. I need correct charset for
> > using CONTAINIG clause.
> >
> > After that alter I was trying to execute such query:
> >
> > SELECT * FROM T1 WHERE BLBFIELD CONTAINING :PARAMVALUE COLLATE UTF8
> >
> > but FB returns error like 'collation is not definied for WIN1250
> > charset' - but the column is not WIN1250 any more ? What is wrong ?
> >
> > b0bik
> >
> >
>
>
> [Non-text portions of this message have been removed]
>