I am looking for a simple method to encode/escape and decode/unescape file paths (illegal characters in file paths "\/?:<>*|
)
HttpUtility.UrlEncode
does its job, except it does not encode the *
character.
All I could find was escaping with regex, or just replacing the illegal chars with _
I want to be able to encode/decode consistently.
I want to know if there's a pre-defined way to do that or I just need to write some code to encode and another piece to decode.
Thanks