2011/4/4 lbendlin <l...@bendlin.us>

> It doesn't actually matter how you store it as under the hood SQLite stores
> everything as string. You can dso dirty type conversion tricks when reading.
>
>

It does not store everything as a string. There are native types for
integer, real and BLOB, in addition to text.

What you're probably refering to is that Android SQlite classes always bind
SQL parameters as strings.



>
>
> From my experience SQLite uses ANSI strings though so in order to read your
> Unicode data back you actually have to use byte arrays for reading, and then
> convert the byte array to unicode string. What the OP showed is an example
> of two bytes per character, misrepresented as an ANSI string.
>

Maybe on other platforms (can't speak for those).

On Android, my current project stores and retrieves values as Strings, which
can contain Western European and Cyrillic characters. I specifically tested
this with a set of charcters that, taken together, can only be represented
as Unicode. It works, and no data loss occurs.

Perhaps the OP actually stores strings as byte arrays, and has mismatched
conversions between storing and retrieving?


>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to