I am writing a web application that requires friendly urls, but I’m not sure how to deal with non 7bit ASCII characters. I don’t want to replace accented characters with URL encoded entities either. Is there a C# method that allows this sort of conversion or do I need to actually map out every single case I want to handle?
Share
I don’t know how to do it in C#, but the magic words you want are ‘Unicode decomposition’. There’s a standard way to break down composed characters like ‘é’, and then you should be able to just filter out the non-ASCII ones.
Edit: this might be what you’re looking for.