ID3TECH
asked on
Illegal characters in path error
Greetings Experts,
I keep getting the "Illegal characters in path" error, and it seems to come from the System.IO.FileInfo constructor, from System.Security.Permission s.FileIOPe rmission.H asIllegalC haracters( String[] str).
The characters which trigger this error are special french characters like é, è, à, etc... So my question is:
Is there a way to either allow these characters, or remove them from the filename with some kind of parsing method.
I tried making this method:
Public Shared Function HasIllegalCharacters(ByVal path As String) As Boolean
Return (path.IndexOfAny(System.IO .Path.Inva lidPathCha rs) >= 0)
End Function
But the System.IO.Path.InvalidPath Chars doesn't contain these special characters. What should I try next?
I keep getting the "Illegal characters in path" error, and it seems to come from the System.IO.FileInfo constructor, from System.Security.Permission
The characters which trigger this error are special french characters like é, è, à, etc... So my question is:
Is there a way to either allow these characters, or remove them from the filename with some kind of parsing method.
I tried making this method:
Public Shared Function HasIllegalCharacters(ByVal
Return (path.IndexOfAny(System.IO
End Function
But the System.IO.Path.InvalidPath
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.