开发者

Android: dealing with spanish e accent

开发者 https://www.devze.com 2023-04-04 08:49 出处:网络
I am working on an Android app that I would like to code in such a way so that the Spanish characters coming from the database are read as equivalent to the English ones. For instance, cafe and café

I am working on an Android app that I would like to code in such a way so that the Spanish characters coming from the database are read as equivalent to the English ones. For instance, cafe and café would be identi开发者_JAVA百科cal.

Is there a way to do this?


Do you mean that you want queries to find both "cafe" and "café" when you search for "cafe"? You should be able to use a regular expressions to do this.

If this needs to be done on the fly, you could write a function that parses the request for 'e' and generate the correct regular expression before creating the DB query.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号