Re: Question marks in local source filenames
David Woolley <[email protected]>
| Newsgroups | gmane.comp.web.lynx.devel |
|---|---|
| Message-ID | <[email protected]> |
On 13/02/2022 04:00, Thorsten Glaser wrote:
> This is of course a bug, local filenames are unconstrained
> other than not containing NUL and slash of course.
>
That's not true. They have the same constraints as the path part of any
URI:
RFC 8089
file-URI = file-scheme ":" file-hier-part
file-scheme = "file"
file-hier-part = ( "//" auth-path )
/ local-path
auth-path = [ file-auth ] path-absolute
local-path = path-absolute
file-auth = "localhost"
/ host
RFC 3986
path-absolute = "/" [ segment-nz *( "/" segment ) ]
segment = *pchar
segment-nz = 1*pchar
pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
/ "*" / "+" / "," / ";" / "="
so ? is not permitted, unless % encoded. White space is also not
permitted. Individual filesystems may further restrict available
characters, e.g. Windows won't allow backslash.