"Oliver Wong" <> wrote in message
news

ymof.2297$lv3.1552@clgrps12...
> AFAIK, there is no built in "toUnaccentedForm()". What you can do that
> might be less painful than implementing your own lastIndexOf() is to built
> a Map of characters that goes from the accented version to the unaccented
> version, and then transforms your string using that map, and THEN do the
> comparison.
I came to the same conclusion, mapping the 10 non-standard lower-case
characters likely to come up in our database. Since I was also using
toLowerCase this also covered the upper-case forms.
I also fiddled around with writing my own equivalent of lastIndexOf() using
CollationElementIterator after finding an example at
http://icu.sourceforge.net/docs/pape...g_in_java.html.
However in the real world that approached turned out to be painfully slow
when searching 1000 strings. In contrast, the approach of mapping 10
characters was very fast because the characters are very rare in our
database so the handling of accented characters did not slow down the
program much.