-2

I've searched for this and cannot find any hint anywhere.

Basically there is a program that formats their file name like this

hello%20world%28hello%20world%29

which is supposed to mean hello world(hello world)

now im wondering is there any way that I could read every file name and anything that uses "%ascii" would be converted to normal text (e.g above).

Thanks in advance guys. I'm not that experienced in code and I'm hoping that someone could help me.

kieran2203
  • 19
  • 3

1 Answers1

2

Use System.Uri.UnescapeDataString:

Uri.UnescapeDataString("hello%20world%28hello%20world%29");

Prints:

hello world(hello world)
DaveShaw
  • 52,123
  • 16
  • 112
  • 141