I have a file with xml
in it. The path contains a character "ñ" in it, but the full path was url
encoded before being saved to the file, so this character is percent encoded along with a number of other characters in the path.
I try to load the file with the following code, and the Exists portion succeeds, but then the Load()
call fails with a
System.ArgumentException: Illegal characters in path.
if (File.Exists(path))
{
var xd = new XmlDocument();
xd.Load(path);
}
I have a bunch of these files with the url encoding being used, but it's only these accented characters that cause problems.
Any ideas?