I need to write a server side function to sanitize URL encoded strings.
Example querystring:
FirstName=John&LastName=B%F3th&Address=San+Endre+%FAt+12%2F14
When I pass that through HttpUtility.UrlDecode()
I get:
FirstName=John&LastName=B�th&Address=San Endre �t 12/14
The function from this SO post is looks perfect but it expects decoded strings that already have accents:
RemoveDiacritics('Bóth`) ==> 'Both';
RemoveDiacritics('San Endre út 12/14`) ==> 'San Endre ut 12/14';
How can I decode the URL without getting all these �
characters?
I cannot do anything client side or change the way they come into my function.