I found this question but it removes all valid utf-8 characters also (returns me a blank string, while there are valid utf-8 characters plus contro
utf-8
If you plan to use the string as a query string, you should consider using the Uri.EscapeUriString() or Uri.EscapeDataString() before sending it out. Note: You might still need to pull out anything from char.IsControl() first?
Uri.EscapeUriString()
Uri.EscapeDataString()