Subject | Re: [firebird-support] Re: Change Blob Sub_Type |
---|---|
Author | Helen Borrie |
Post date | 2009-05-08T01:16:05Z |
At 09:20 AM 8/05/2009, you wrote:
There's no way that the Firebird client charset or the default database charset can transliterate your search string, that is probably ANSI or, at best, UTF8 (depending on what your client and DB charsets are) into UTF-16 encoding to make it a valid search string for your data.
What you can do is convert the search string to UTF-16 at the client somehow and pass it (possibly with a transforming function expression) as a literal. There are tools and components around that can do this conversion for you. I believe the Jaybird driver can be configured to do it automatically (ask on the firebird-java list if this is your environment); for others you will need to find out explicitly from the interface developers. It's worth an ask on firebird-tools, as well.
Depending on how you're using the data, you could look into some converter for your incoming data and actually store it as UTF8. (If the default charset isn't UTF8 then make it an attribute of the blob field itself.) A blob filter could be helpful here, if you could write one, or find one ready-made.
./heLen
>> then you are probably not using the exact search string (including XML)There's why.
>> Alan
>>
>
>I don't see why I should have to. This works with any other content in the Blob field with the exception of XML.
>
>Here is a snippet from the contents of the XML data in the blob field :
>
><?xml version="1.0" encoding="UTF-16" ?>
There's no way that the Firebird client charset or the default database charset can transliterate your search string, that is probably ANSI or, at best, UTF8 (depending on what your client and DB charsets are) into UTF-16 encoding to make it a valid search string for your data.
What you can do is convert the search string to UTF-16 at the client somehow and pass it (possibly with a transforming function expression) as a literal. There are tools and components around that can do this conversion for you. I believe the Jaybird driver can be configured to do it automatically (ask on the firebird-java list if this is your environment); for others you will need to find out explicitly from the interface developers. It's worth an ask on firebird-tools, as well.
Depending on how you're using the data, you could look into some converter for your incoming data and actually store it as UTF8. (If the default charset isn't UTF8 then make it an attribute of the blob field itself.) A blob filter could be helpful here, if you could write one, or find one ready-made.
./heLen