开发者

android < 2.3 and java.text.Normalizer

开发者 https://www.devze.com 2023-03-12 18:04 出处:网络
What\'s the best alternative to to java.text.Normalizer in android开发者_运维问答 versions previous than 2.3?

What's the best alternative to to java.text.Normalizer in android开发者_运维问答 versions previous than 2.3? http://developer.android.com/reference/java/text/Normalizer.html

I need to match Strings like

perché perchè perche

thanks

Nicola


I have two solutions:

1.) Get the source for Normalizer from here and here. (it's a few thousand lines)

2.) Build a simple translation HashMap yourself. Maybe your will have just French users for some time? This is a suboptimal solution but practical until your app goes worldwide.

0

精彩评论

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