I'm trying to provide a case-insensitive search in greek texts from a
jsp page. The check goes like this:
if (el_title.toUpperCase().indexOf(selected_title.toU pperCase()) {
....
}
where selected_title is the value of a field from the search form and
el_title is the value retrieved from the database. The problem is that
some of the greek characters, namely those with tonos (accent) or
dialytika (diairesis) and the final s, are not converted to uppercase
correctly, so the search fails (while it works ok for strings not
containing such letters).
I also tried to invoke toUpperCase() with a Locale argument, like this:
Locale el_locale = new Locale("el");
....
if
(el_title.toUpperCase(el_locale).indexOf(selected_ title.toUpperCase(el_locale))
{
....
}
but it didn't work either. Any ideas?
Vangelis Natsios