sanatchandravanshi / quickdroid

Automatically exported from code.google.com/p/quickdroid
0 stars 0 forks source link

Search doesn't work with accented/international characters #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Have any contact with accented characters (like "Jesús") in the contact 
book.
2. Launch Quickdroid.
3. Searching for "Jesús" or "jesus" won't find the contact. Searching for 
"Jes" will.

What is the expected output? What do you see instead?

Actually I expect to find the contact if I spell it as it's stored (with 
the special character). It would be fantastic for it to find the contact by 
entering the "unaccented" character too.

Instead, it doesn't find it even if typed in exactly the same way.

What version of the product are you using? On what operating system?

2.5 on Android 1.6 on Samsung Galaxy GT i7500.

Please provide any additional information below.

Original issue reported on code.google.com by skanda...@gmail.com on 22 Oct 2009 at 2:34

GoogleCodeExporter commented 9 years ago
I've looked at the sources, and the problem seems to be sqlite not supporting 
unicode
lower/upper transformations. It requires an ICU extension that seems to be 
missing in
the version that Android ships.

I've hacked a patch that leaves the UPPER() to sqlite for the pattern too. This 
at
least makes exact matches work, since sqlite doesn't touch the accented 
characters.

I also did a little change that seems to fix this error trace:

E/AndroidRuntime( 9671): Uncaught handler: thread Searcher #3 exiting due to 
uncaught
exception
E/AndroidRuntime( 9671): java.lang.IllegalArgumentException: the bind value at 
index
1 is null
E/AndroidRuntime( 9671):    at
android.database.sqlite.SQLiteProgram.bindString(SQLiteProgram.java:174)
E/AndroidRuntime( 9671):    at
android.database.sqlite.SQLiteQuery.bindString(SQLiteQuery.java:190)
E/AndroidRuntime( 9671):    at
android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.
java:55)
E/AndroidRuntime( 9671):    at
android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1
118)
E/AndroidRuntime( 9671):    at
android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1006
)
E/AndroidRuntime( 9671):    at
android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:964)
E/AndroidRuntime( 9671):    at
android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1078)
E/AndroidRuntime( 9671):    at
vu.de.urpool.quickdroid.apps.AppProvider.query(AppProvider.java:111)
E/AndroidRuntime( 9671):    at
android.content.ContentProvider$Transport.query(ContentProvider.java:129)
E/AndroidRuntime( 9671):    at
android.content.ContentResolver.query(ContentResolver.java:149)
E/AndroidRuntime( 9671):    at
vu.de.urpool.quickdroid.apps.AppLauncher.getSuggestions(AppLauncher.java:67)
E/AndroidRuntime( 9671):    at
vu.de.urpool.quickdroid.Searcher$AsyncSearcher.run(Searcher.java:81)
E/AndroidRuntime( 9671):    at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:6
48)
E/AndroidRuntime( 9671):    at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:673)
E/AndroidRuntime( 9671):    at java.lang.Thread.run(Thread.java:1058)

Original comment by skanda...@gmail.com on 22 Oct 2009 at 9:15

Attachments:

GoogleCodeExporter commented 9 years ago
I'd love to see it search in accent-independent way:
Many keyboards don't support accents well, so if I was able to type "Slawek" 
and it found "Sławek" too.

It would be a great improvement for me, especially as the default contacts 
search doesn't support it (a pretty significant hit, as my 5-year old WinMo 
phone had proper contacts lookup).

Now I'm using Android 2.3 and it finds accented names if I type them 
explicitly, but it's suboptimal.

Original comment by MSmia...@gmail.com on 23 Jul 2011 at 8:42