A NOTE has been added to this issue. ====================================================================== http://austingroupbugs.net/view.php?id=1202 ====================================================================== Reported By: kre Assigned To: ====================================================================== Project: 1003.1(2016)/Issue7+TC2 Issue ID: 1202 Category: Shell and Utilities Type: Clarification Requested Severity: Objection Priority: normal Status: New Name: Robert Elz Organization: User Reference: Section: XCU 4 -- printf Page Number: 3113 Line Number: 104118 - 104120, 104123 - 104126 Interp Status: --- Final Accepted Text: ====================================================================== Date Submitted: 2018-08-29 19:26 UTC Last Modified: 2018-08-30 18:13 UTC ====================================================================== Summary: printf %.Nb with \c in arg (more than N chars into arg) behaviour unclear ======================================================================
---------------------------------------------------------------------- (0004096) shware_systems (reporter) - 2018-08-30 18:13 http://austingroupbugs.net/view.php?id=1202#c4096 ---------------------------------------------------------------------- Yes, it does say that... Your interpretation would be phrased "bytes from the argument string, as converted, shall be written as if by putc()", or similarly, to require that piecemeal effect, but it says take them from the ~wholly~ converted string, not while converting. It is an indication because the 'wholly' is implied, but I don't see the first interpretation allowed as the intent. The string has to be fully formed before you can take bytes from it, in other words, otherwise it is just a character sequence that may have invalid code points, as bad escapes or according to the charmap of the current locale. Granted, doing it piecemeal is less memory usage intensive, so an implementer might want to read it that first way, but in other parts of the standard it is explicit where this is permitted or required, using phrases like "as if by putc()". Issue History Date Modified Username Field Change ====================================================================== 2018-08-29 19:26 kre New Issue 2018-08-29 19:26 kre Name => Robert Elz 2018-08-29 19:26 kre Section => XCU 4 -- printf 2018-08-29 19:26 kre Page Number => 3113 2018-08-29 19:26 kre Line Number => 104118 - 104120, 104123 - 104126 2018-08-30 12:46 joerg Note Added: 0004092 2018-08-30 14:43 shware_systems Note Added: 0004093 2018-08-30 16:28 kre Note Added: 0004095 2018-08-30 18:13 shware_systems Note Added: 0004096 ======================================================================