I am creating a search utility that will search elements in a SQLITE DB, Only problem is, that the DB contains some characters like Å è ô which are in Latin...
Is there an easy way to ignore these letters and treat them as there English alphabet counterparts (Å = A, è = e ...) ?
I thought of designing 1 to 1 mappings of all such characters something like,
HashMap<Character, Character> lstOfChar = new HashMap<Character, Character>();
lstOfChar.put('Å', 'A');
lstOfChar.put('è', 'e');
And when retrieving data from database each of such character will be replaced by there English alphabet equivalent and search result will be displayed.
If I am searching
Deepak
then the rows containingDeepÅk
orDÈepak
ordeepÃk
should be searched
But it will be long process and maintenance will be hard too.
Is there some elegant way, may be SQLITE provide some functionality or is it possible through SQL
.
I am using Java
platform.
EDIT I found the Normalizer in posted answer do help to do the thing programmatic after fetching the results but can this be done by the database
or through firing SQL
in some special way, as it takes lot of time to fetch the results and apply this function and return result.