assert(uri("file", null, "/home/foo/bar.d", null, null) == "file:///home/foo/bar.d"); assert(uri("file", null, "/home/foo bar.d", null, null) == "file:///home/foo%20bar.d");
See Implementation