tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: printf(1), sh(1), POSIX.2 and octal escape sequences



On Mon, Jul 03, 2023 at 06:13:45AM +0000, David Holland wrote:
> On Fri, Jun 30, 2023 at 05:51:13PM +0200, tlaronde%polynum.com@localhost wrote:
>  > For this one I will go with the established behavior, but what should I
>  > do when someone is passing, in octal or in hexa: "\000" ou "\x00"?
> If you don't support embedded nulls in the strings you're handling
> (and most things don't), it's an error.
Or just expand everything unchecked and document that input must
be a text file before and after expansion, then it's the user's
fault, especially if they don't know what that means.

That's how dad did it after all, and that's how other programs in
the distribution behave.

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index