public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "carlos at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/28944] strfmon field width is inconsistent with %f formatting
Date: Mon, 06 Feb 2023 17:57:26 +0000 [thread overview]
Message-ID: <bug-28944-131-T8x6kD0Y9j@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-28944-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=28944
Carlos O'Donell <carlos at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |carlos at redhat dot com
--- Comment #2 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Florian Weimer from comment #0)
> strfmon field width currently counts bytes, not characters, unlike printf
> (bug 28943). This does not seem useful for localization purposes.
>
> POSIX.1-2017 requires counting bytes.
If the standard says bytes then I think this should remain at bytes even though
it is less than useful for localization purposes.
In order to make a logical minimum column size the application will need to use
nl_langinfo to determine various parameters, count bytes, and then pass an
adjusted field width in bytes based on the application logic. It would be
easier to pass in a character count, but that is not the case today. The
standard would have to be expanded to have a "character count width" rather
than "width" in this case.
I'm of the opinion that this is likely a CLOSED / WONTFIX, but that this bug
can be used to document the current implementation position on the issue.
Note: Even for %s/%S there is confusion in the standard about "characters
(bytes)" which means the word "character" is often used for the char type
rather than logical characters.
--
You are receiving this mail because:
You are on the CC list for the bug.
prev parent reply other threads:[~2023-02-06 17:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-04 8:44 [Bug libc/28944] New: " fweimer at redhat dot com
2022-05-23 9:08 ` [Bug libc/28944] " cvs-commit at gcc dot gnu.org
2023-02-06 17:57 ` carlos at redhat dot com [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-28944-131-T8x6kD0Y9j@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=glibc-bugs@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).