Thursday, February 24, 2011

Re: [android-developers] Re: SQLite and Collate UNICODE

Yes, but Android have worked around this problem by doing what the
SQLite people suggest. Namely making the Unicode collator available:


http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html

(just search the page for UNICODE).

it's just it does not seem to be working quite right for me.


On 25/02/2011 4:23 PM, DanH wrote:
> http://www.sqlite.org/faq.html#q18
>
> On Feb 24, 7:55 pm, Grunthos <p...@rhyme.com.au> wrote:
>> Hi,
>>
>> In SQLite under Android 2.1 and 2.2 I have been using 'Collate
>> UNICODE' to sort and compare values; for sorting it does what I expect
>> -- it is case-insensitive, and handles the expanded character set
>> well.
>>
>> But for comparisons, eg. f = 'something' where f is a text field, it
>> seems to NOT do case-blind comparions.
>>
>> Specifically:
>>
>> On table authors(..., family_name text,...);
>>
>> I searched for
>>
>> select * from authors a where a.family_name = 'Le Guin' Collate
>> UNICODE
>>
>> and it returned 0 rows even though there was an entry with family_name
>> = 'le Guin'.
>>
>> Am I missing something here? Should I be wrapping both sides of the
>> '=' in a call to 'Upper()'. I thought that the UNICODE collator for
>> SQLite was case-insensitive.
>>
>> If I do wrap both sides in calls to 'Upper()', am I correct in
>> assuming indexes will not be used?

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment