help / color / mirror / code / Atom feed
From: Vincent Lefevre <vincent@vinc17.net>
To: zsh-workers@zsh.org
Subject: Re: Test ./E03posix.ztst was expected to fail, but passed.
Date: Wed, 23 Mar 2022 17:17:30 +0100	[thread overview]
Message-ID: <20220323161730.GA1190496@cventin.lip.ens-lyon.fr> (raw)
In-Reply-To: <20220323103835.hpoprdgt45iyqqgt@chazelas.org>

On 2022-03-23 10:38:35 +0000, Stephane Chazelas wrote:
> It's been raised several times on the POSIX mailing list, and
> my understanding the opengroup doesn't consider it as a bug, and
> they have made it clear that they would not address it. They may
> consider specifying ksh93's %Ls (which pads based on display
> width, not byte nor character count) if enough implementations
> start to support it.
> That's why I didn't bother raising it as a bug personally, but
> to me, that position (where printf(1) is meant to be an
> interface to printf(3) without decoding those bytes into
> characters) does not make sense. printf is to print formatted
> text, not doing padding of binary strings. printf(3) was
> extended with wprintf(3) to handle wide characters, printf(1)
> should have been enhanced to switch to that or equivalent just
> like every other text utility is now specified to be able to
> cope with wide characters.

Counting bytes seems useful, e.g. because file formats have fields
with some maximum length in *bytes*. Counting characters seems
less common. It would be more interesting to search for scripts
that use %s with a width and/or a precision, and see what they

Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

  reply	other threads:[~2022-03-23 16:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-15 16:33 Vincent Lefevre
2022-03-15 16:53 ` Mikael Magnusson
2022-03-16 15:30   ` Jun. T
2022-03-22  3:32     ` Jun T
2022-03-22 13:03       ` Vincent Lefevre
2022-03-22 21:04       ` Bart Schaefer
2022-03-23  2:26         ` Vincent Lefevre
2022-03-23 10:38           ` Stephane Chazelas
2022-03-23 16:17             ` Vincent Lefevre [this message]
2022-03-23  7:14         ` Jun T
2022-03-29  9:10           ` Jun T
2022-03-29  9:00     ` Jun T

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220323161730.GA1190496@cventin.lip.ens-lyon.fr \
    --to=vincent@vinc17.net \
    --cc=zsh-workers@zsh.org \


* 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.
Code repositories for project(s) associated with this public inbox


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 NNTP newsgroup(s).