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