Re: behavior of printf '\x61'

2021-04-16 Thread Chet Ramey via austin-group-l at The Open Group
On 4/16/21 3:41 PM, Philip Guenther via austin-group-l at The Open Group wrote: - 7. An additional conversion specifier character, b, shall be supported as follows. ... The interpretation of a followed by any other sequence of characters is unspecified. - That exception is about

Re: behavior of printf '\x61'

2021-04-16 Thread Philip Guenther via austin-group-l at The Open Group
- 7. An additional conversion specifier character, b, shall be supported as follows. ... The interpretation of a followed by any other sequence of characters is unspecified. - That exception is about the %b conversion and the handling of its argument, so while that says that printf

Re: behavior of printf '\x61'

2021-04-15 Thread Philip Guenther via austin-group-l at The Open Group
Correction after off-list poke: FreeBSD's /usr/bin/printf and the printf builtin to /bin/sh both show "x61" On Thu, Apr 15, 2021 at 7:04 PM Philip Guenther wrote: > The general question is what requirements the standard put on the printf > utility when the format argument contains a \x or other

Re: behavior of printf '\x61'

2021-04-15 Thread shwaresyst via austin-group-l at The Open Group
It is covered in Item 7 of those 11 exceptions, 'x' falling under the blanket "every character not specified is unspecified". Portable code is expected to use the work alike octal escape, not hex codes. On Fri, Apr 16, 2021 at 12:05 AM, Philip Guenther via austin-group-l at The Open Group

Re: behavior of printf '\x61'

2021-04-15 Thread Oğuz via austin-group-l at The Open Group
16 Nisan 2021 Cuma tarihinde Philip Guenther via austin-group-l at The Open Group yazdı: > > Did I miss a statement about somewhere that renders this > behavior unspecified? > P1003.1™-202x/D1.1 Page 3036, Line 102784: > The interpretation of a followed by any other sequence of characters is

behavior of printf '\x61'

2021-04-15 Thread Philip Guenther via austin-group-l at The Open Group
The general question is what requirements the standard put on the printf utility when the format argument contains a \x or other unspecified backslash escape, but the example in the subject is a nice concrete example: what's required for or about the output of printf '\x61' ? 1003.1-2016