Re: [PATCH v3] filename.7: new manual page

Thaddeus H. Black
2021-10-19T11:32:36Z

[-- Attachment #1: Type: text/plain, Size: 1496 bytes --]

On Tue, Oct 19, 2021 at 10:54:11AM +0200, Florian Weimer wrote:
> Maybe add: “A pathname contains zero or more filenames.”

Okay.

> What does this mean? I think only byte 0x2f is reserved. The UTF-8
> comment is misleading. A historic/overlong encoding of / in multiple
> UTF-8 bytes is *not* reserved.

I had not known that UTF-8 had an alternate encoding for any ASCII
character. Does it indeed have an alternate encoding? If so, where
can I learn more?

The new filename(7) manual page wishes to be correct but, otherwise,
would like to inflict upon the reader as little difficult technical
prose as it can. The page wants to remain readable. In this light, can
you advise me how the page should speak to your point?

> This conflicts with the presentation of / as a separator in pathnames, I
> think: The pathname "/usr/" contains two empty filenames.

I had not thought of that. Good point.

Thus, the empty filename is not forbidden but rather is reserved.

> > +No filename may exceed\~255 bytes in length,
> > +or\~256 bytes after counting the terminating null byte.
>
> This is not correct for Linux. Despite the definition of NAME_MAX,
> filenames can be longer than 255 bytes. NTFS and CIFS have a limit of
> 255 UTF-16 characters, which translates to about 768 bytes in the UTF-8
> encoding used by Linux.

I see.

Your feedback is helpful and appreciated (especially since you are the
first Fedora-class user to return a review).