New: printf family returns number of bytes written, not characters
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: [email protected]
Reporter: [email protected]
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.
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.
[Bug 218600] printf family returns number of bytes written, not characters
https://bugzilla.kernel.org/show_bug.cgi?id=218600
Alejandro Colomar ([email protected]) changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |[email protected]
Resolution|--- |CODE_FIX--- Comment #1 from Alejandro Colomar ([email protected]) --- Thanks! This has been fixed now:
Have a lovely day!
Alex
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.