Is there anyway to make the regexp accent-insensitive? (/a/ match with Ã£
If not, can any one give a solution to my problem:
I’m making a search web page with mod_ruby, so I made an
accent/case-insensitive sql query and this works fine (with
latin1_swedish_ci). Now I want to highlight what the user searched for.
To achieve this I’m doing something like:
This works fine if search and the relevant part of string don’t have
accents, but if there are any accents it doesn’t match, so the entry is
I know that with
I can remove all the accents from str, so I can remove the accents from
‘search’ without any problem, but if I remove some accents from string
to do the highlighting, I need to put it back later to display it to the
Does anyone have any idea?