public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* [Bug 218600] New: printf family returns number of bytes written, not characters
@ 2024-03-14 22:16 bugzilla-daemon
  2024-03-15 23:33 ` [Bug 218600] " bugzilla-daemon
  0 siblings, 1 reply; 2+ messages in thread
From: bugzilla-daemon @ 2024-03-14 22:16 UTC (permalink / raw)
  To: linux-man

https://bugzilla.kernel.org/show_bug.cgi?id=218600

            Bug ID: 218600
           Summary: printf family returns number of bytes written, not
                    characters
           Product: Documentation
           Version: unspecified
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: low
          Priority: P3
         Component: man-pages
          Assignee: documentation_man-pages@kernel-bugs.osdl.org
          Reporter: quirin.blaeser@freenet.de
        Regression: No

For comparison:
https://pubs.opengroup.org/onlinepubs/9699919799/

In an utf8 environment the number of bytes written may differ
from the number of characters.

Example:
fprintf( stdout, "%*s\n", fprintf( stdout, "öäüÖÄÜßµł€\n"), "^");

From https://man7.org/linux/man-pages/man3/dprintf.3.html:
"Upon successful return, these functions return the number of
 characters printed (excluding the null byte used to end output to
 strings)."

Greetings.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug 218600] printf family returns number of bytes written, not characters
  2024-03-14 22:16 [Bug 218600] New: printf family returns number of bytes written, not characters bugzilla-daemon
@ 2024-03-15 23:33 ` bugzilla-daemon
  0 siblings, 0 replies; 2+ messages in thread
From: bugzilla-daemon @ 2024-03-15 23:33 UTC (permalink / raw)
  To: linux-man

https://bugzilla.kernel.org/show_bug.cgi?id=218600

Alejandro Colomar (alx@kernel.org) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |alx@kernel.org
         Resolution|---                         |CODE_FIX

--- Comment #1 from Alejandro Colomar (alx@kernel.org) ---
Thanks!  This has been fixed now:

<https://www.alejandro-colomar.es/src/alx/linux/man-pages/man-pages.git/commit/?h=contrib&id=e0fc7ee5e3d664c83bd0f4fc751ef80cf38ae1bc>

Have a lovely day!
Alex

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-15 23:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-14 22:16 [Bug 218600] New: printf family returns number of bytes written, not characters bugzilla-daemon
2024-03-15 23:33 ` [Bug 218600] " bugzilla-daemon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox