On 12/5/07, Maxim V. Shiyanovsky <[EMAIL PROTECTED]> wrote:

> I have table that holds values of different types in utf16.
> I also know value type for the current row.
> How should I cast value to compare it with integer?
>
> This test shows 1 instead of 17 that I expected.
>
> sqlite> create table t (value text, field_type int);
> sqlite> insert into t values (X'31003700', 1);
> sqlite> select value from t;
> 1

Based on your description, I think you mean you're trying to store a
string of Unicode characters, and you're just working with them as
UTF-16 in your application.

In that case, the problem is that you're trying to use blobs. Use text
instead. sqlite3_bind_text16() will let you use UTF-16 in your
application, and SQLite will take care of the on-disk encoding and
byte order.

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to