I looked up this on the coreutils mailing list (the nearer they have to
a BTS, and there is this entry: http://lists.gnu.org/archive/html/bug-
coreutils/2006-01/msg00070.html about this behaviour:

"Update of patch #3286 (project coreutils):

                  Status:                    None => Invalid

    _______________________________________________________

Follow-up Comment #1:

POSIX requires the current behavior, where the argument that matches up to %c
is treated as a string and the first character of that string is printed.  So,
unfortunately, your patch cannot be accepted without violating POSIX semantics
for printf(1).  What would be useful, however, is a documentation patch that
makes this behavior clear in both the info pages and the --help output (right
now, the info pages assume that you already know how printf(3) works, which is
not as useful as it could be; and fails to mention that %c parses its argument
as a string and not a C constant integer).  I'm leaving this patch open as a
reminder that a doc patch is needed."

So it seems what is really needed is to update the documentation.

-- 
printf(1) %c doesn't work as expected, instead like %.1s.
https://bugs.launchpad.net/bugs/225637
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to