Edit: Rewrote the whole question to make it more clear.
I'm using the System.Windows.Media.MediaPlayer class to play mp3 files and it requires me to send in a Uri object. Most files work fine, but I've encountered a few files that happen to contain escape characters in their actual filenames. (like this: "C:\file\path\some%20%E5%8D%88%E5%A4name.mp3") These fail to load because when I'm creating a System.Uri object, the contructor assumes those characters should be decoded (which they shouldn't) and automatically converts them into their unicode form (japanese characters).
Why do those files have such strange names? The files belong to another application, so I have no control over the naming. I'm simply trying to play the files.
I've tried escaping the escape characters, but when I do that, the Uri constructor skips any decoding and leaves me with an invalid file path.
It is possible avoid un-escaping certain characters using this solution, but that doesn't cover the characters in my case.
In short, I have a valid file path as a string (which returns 'true' in File.Exists(filepath)), but in creating a System.Uri object, it gets altered such that it becomes invalid. I'm trying to get it to either swallow the raw filepath somehow, or in some other way generating a System.Uri object that points to the file.