views:

75

answers:

1

I have a search form that I want my users to be able to enter English character equivalents for non-English characters.

For example. To find Ælfred, the user could search for "Ælfred" or "AElfred".
the search should also be case insensitive so "aelfred" would work.
I also have it searching so that, by default, it matches the beginning of the string so a search of "Æ" or "AE" or even "A" would contain Ælfred in the results.

Other conversions such as ê -> e, å -> a, would need to be accounted for.

I am using ASP.NET with a SQL backend. Are there any standard libraries that help out with this sort of search?

+1  A: 

Not always there is a English character equivalent to a non-English character, but can try to store a Normalized string in a different field using string.Normalize and comparing to that.

MS SQL fields and full text search catalogs can be accent-insensitive and case-insensitive, so you got the other cases covered.

Eduardo Molteni
Thanks for the tip - I hadn't considered doing a 2nd field - I may add that in.
Jeff Martin