The standard (default) collection URI resolver invoked by the collection() function cannot handle a URI that contains a space character. Although this is not strictly non-conformant (the specification allows the implementation complete freedom in this area) it is inconvenient, and inconsistent with the doc() function, so a patch is being raised (on the 9.1 branch only) to fix it.
Other special characters (for example European accented letters) are generally allowed in the supplied URI without escaping. Characters that have special meaning in a URI but not in a filename (for example, %) should be escaped (for example as %25).
Use of a backslash in the URI is not allowed. If the intention was to use this as a separator, it should be written as a forwards slash. If the backslash literally appears in the file name (on an operating system that allows this) then it should be %-encoded.