Frage

This is a really weird error and I scratched my head over it for a bit.

I had a uri that kept giving me "the given paths format is not supported" error. It was working fine in previous builds so I was like wtf? I ended up going to a backup and the line worked perfect. I finally decided to copy and past it as a last resort.

What I got in the end are three lines of code which look exactly the same (atleast in VS13 code editor) but only the top line of code gives me an error. The second line is from a previous build and the third is one I re-typed out by hand. The second and third work though. Hidden characters or something? Makes no sense to me..

contentPlayer.PlayUri(new Uri(@"‪‪D:\music videos\Tha Joker (Too Cold) ft. T. Lewis - Two Weeks Notice [Studio.mp4", UriKind.RelativeOrAbsolute), "2 Chainz - Good Morning");

contentPlayer.PlayUri(new Uri(@"D:\music videos\Tha Joker (Too Cold) ft. T. Lewis - Two Weeks Notice [Studio.mp4", UriKind.RelativeOrAbsolute), "2 Chainz - Good Morning");

contentPlayer.PlayUri(new Uri(@"D:\music videos\Tha Joker (Too Cold) ft. T. Lewis - Two Weeks Notice [Studio.mp4", UriKind.RelativeOrAbsolute), "2 Chainz - Good Morning");
War es hilfreich?

Lösung

Examination of the strings in a binary editor reveals two instances of the Left-To-Right Embedding UNICODE character (U+202A) between @" and D:\.

These characters are not printable, so you cannot see them in the string. You can possibly remove them with a binary editor, or simply retype the string, as you did.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top