Re: [sqlite] Accented chars in Android embeded Sqlite.
Hello Yahoo, Another possible solution seeing you're on the Android platform and writing in Java is to use a less high tech solution and store an additional column with a copy of the text you're searching where you've stripped the accents out and use that for the search instead. It would use additional storage but would give you the control you're after in a simple manner. Regards, Karl Edwall Wednesday, May 16, 2012, 11:23:25 AM, you wrote: Y Hi everyone! Y Im Brazilian, also, Android Dev. Y Im in a struggle with Sqlite and accented chars such as á or é. Y What Im trying to do is a select with where accent insensitive. Y For months I have having research over and over the internet to accomplish Y that, but, unfortunately unsuccessful. Y Y What I need is something like this: Y select * from table where column like a% Y and result be: Y agora Y água Y através Y and so on Y Y Its possible? Or better to commit suicide ;-) Y Thanks in advance Y Youre all aces in my book. Y Y ___ Y sqlite-users mailing list Y sqlite-users@sqlite.org Y http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Accented chars in Android embeded Sqlite.
Hi everyone! Im Brazilian, also, Android Dev. Im in a struggle with Sqlite and accented chars such as á or é. What Im trying to do is a select with where accent insensitive. For months I have having research over and over the internet to accomplish that, but, unfortunately unsuccessful. What I need is something like this: select * from table where column like a% and result be: agora água através and so on Its possible? Or better to commit suicide ;-) Thanks in advance Youre all aces in my book. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Accented chars in Android embeded Sqlite.
On Tue, May 15, 2012 at 9:23 PM, Yahoo bossco...@yahoo.com.br wrote: Hi everyone! I’m Brazilian, also, Android Dev. I’m in a struggle with Sqlite and accented chars such as ‘á’ or ‘é’. What I’m trying to do is a select with where accent insensitive. For months I have having research over and over the internet to accomplish that, but, unfortunately unsuccessful. What I need is something like this: select * from table where column like ‘a%’ and result be: agora água através and so on There is a file in the latest source tree named test_spellfix1.c which includes an application-defined SQL function named spellfix1_translit(X). See http://www.sqlite.org/src/artifact/495535f3eb57a?ln=1152-1171 for the implementation. The spellfix1_translit(X) function attempts to convert its input string X into a pure ASCII transliteration. In other words, it removes the accented characters, replacing them with ASCII equivalents. Example: SELECT spellfix1_translit('água'); -- returns agua You could, perhaps, add such a function to your application, then use it to accomplish what you describe above: SELECT * FROM table WHERE spellfix1_tanslit(column) LIKE 'a%'; Note that spellfix1 is not currently a part of any build and is unsupported. But you can use it as a guide to your own implementation. It’s possible? Or better to commit suicide ;-) Thanks in advance You’re all aces in my book. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users