How to supress a # into a path string

I try to load a file with WWW : the problem is one folder of the file got a “#” in his name.

How could i supress it ? I already try “@” before my string variable named “path” like this :

WWW www = new WWW(“file://” + @path);

and it didn’t work. Any idea ?

URL can only contains alphanumeric characters. “#” is considered a special character.

Two solutions:

  1. Rename the folder. It is not standard to have a “#” in a path name.
  2. Encode the “#” character so that it fits the urlencoded standard, in this case %23. For that purpose, you can use WWW.EscapeURL().