Search code examples
c#culturediacritics

Asp.Net /C# when is Å equal to A? (and É equal to E)


i'm paging countries in an alfabet, so countries starting A-D, E-H etc. But i also want to list åbrohw at the a, and ëpollewop at the e. I tried string.startswith providing a stringcompare option, but it doesn't work...

i'm running under the sv-SE culture code, if that matters...

Michel


Solution

  • See How do I remove diacritics (accents) from a string in .NET? for the solution to create a version without the diacritics, which you can use for the comparisons (while still displaying the version with the diacritics).