C # special characters in a line folding program

I have a little problem with the outline:

"D:\\Music\\DJ Ti%C3%ABsto\\Tiesto\\Adagio For Strings (Spirit of London).mp3"
"D:\\Music\\Dj Tiësto\\Tiesto\\Adagio For Strings (Spirit of London).mp3"

Currently, when he sends this path to my audio library, he cannot open the path. (the reason for its failure is to assign -1 to the trackbar ... but that doesn't matter).

So I'm curious, anyway, so that C # doesn't switch special characters with% [code]? I made .Replace for "[" and "]", but I do not need to search for every single character and add a line of code to prevent it. Anyway, around?

+3
source share
1 answer

To call Uri.UnescapeDataString.

, @ , escape-, : @"D:\Music\DJ Tiësto\Tiesto\Adagio For Strings (Spirit of London).mp3". , .

+5

Source: https://habr.com/ru/post/1721832/


All Articles