From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 1247 invoked from network); 23 Mar 2022 16:18:26 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 23 Mar 2022 16:18:26 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1648052307; b=D4aPLoc4oWPA1b3AEy11tH0Y0ZOdCOSWCD0kCzGZOBtcBDUDt7AOgLxSE0sEBSmkisVu/KAtCa 4AtETKq4IB9E3zMxVpaYGQViwVmnnqfa+EG8CAKFsVJIWpaYvHbrmnRtXuG6cNpI0rmCIQvfS1 rXgr0bVSek0LUtnfD3j9GW8BWpFAHKnWUEMHnIJDuMln8TXzj/lf751FGbJHBTS0S/QYOvgJfM 9yHP6EVOiJFsVR7VBd24Ev55pdCDAf5xGeI1aeRbQlQbPjo/d/5uXAmn55uj+sA5ohdh4p4Ucl LrOQ+NnjfEpp88z66i1apNs1CfhSU5TrAjBTg/M1gdrxeQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (cventin.lip.ens-lyon.fr) smtp.remote-ip=140.77.13.17; dmarc=none header.from=vinc17.net; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1648052307; bh=1Iktgb6gLk9cI29seBAwN/6PNsoV9dJRs10t9jhtm/0=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Message-ID:Subject:To:From:Date:DKIM-Signature; b=pvYflViHkIC2cxLuwvGmhVttHfZ/Dx/nnpoJkn3tAFG3Mrkg6tS6OjniUq3DZ+GHhpHfFEC74j HRkc8qXjnNd/9BGIR/JSP14lcuZZit8QidZiAFWxLeFCvPuQlx8QRdg/3+opC2fCd+c6PkAzFU MqDUyOILg3DLwHBCbH9DuZXIvRj8iEY/1T4E7D/X3v5mCUE/JOjFFv8UH5tDLLKpIaxdoIkSq8 KiafrREUCK4+VXT/BbXxt1vAAnRQCLJ6r9EiHv35BiC07SoTBx5rRNkj0ctVtklHHfCf0w+qmI +TkgKmsnTjTuJv5vGfY8Cj8ZAwfeUA8y2Hm/IWHv+1g4gw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:To:From:Date: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=oKdV2PGxuSJWRlMnQdIDjAXjgx7x7KsK1gjTnKNe6j4=; b=ZoJ9FDcuTTWFQkxl09IU4HNcEC 2JJIGoFjxpV2N8OiDWv2l200FQYvryIluRKgabsGw8uSTgpDBkWwMSWxME/bCJ/D950DxmdSmoASO vxgA39Y+1HG6XlbuJ5Gl4VbJAS9YW1aQ2mPR4MieamvF1wEK0nilx9TbD8fl8iAUkaHxoAOTDsEkk oeKT3UyXmUvGnQdvl6DzBr5XljNjai6RTqVeBdEiv5dUU+3Y2rjM9ZGOYkZfM5YRNrOTS/VQSnFJD aKEZ8TxJCCLZVcTZavtp2OvAEnL0B/HWGXcXSc4INPS+wsyTKgNYVo/SSw1a37S7jCbbMwIl6NNdi 51qH0FzA==; Received: from authenticated user by zero.zsh.org with local id 1nX3gm-000E31-Ub; Wed, 23 Mar 2022 16:18:24 +0000 Authentication-Results: zsh.org; iprev=pass (cventin.lip.ens-lyon.fr) smtp.remote-ip=140.77.13.17; dmarc=none header.from=vinc17.net; arc=none Received: from cventin.lip.ens-lyon.fr ([140.77.13.17]:36600) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1nX3fv-000Dig-CD; Wed, 23 Mar 2022 16:17:31 +0000 Received: from vlefevre by cventin.lip.ens-lyon.fr with local (Exim 4.95) (envelope-from ) id 1nX3fu-004zq0-Hf; Wed, 23 Mar 2022 17:17:30 +0100 Date: Wed, 23 Mar 2022 17:17:30 +0100 From: Vincent Lefevre To: zsh-workers@zsh.org Subject: Re: Test ./E03posix.ztst was expected to fail, but passed. Message-ID: <20220323161730.GA1190496@cventin.lip.ens-lyon.fr> Mail-Followup-To: zsh-workers@zsh.org References: <20220315163347.GA617047@zira.vinc17.org> <082447B3-C6A4-44A1-A3D3-7FD89D707480@kba.biglobe.ne.jp> <20220323022644.GA349036@zira.vinc17.org> <20220323103835.hpoprdgt45iyqqgt@chazelas.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220323103835.hpoprdgt45iyqqgt@chazelas.org> X-Mailer-Info: https://www.vinc17.net/mutt/ User-Agent: Mutt/2.2.1+12 (1ba319cf) vl-138565 (2022-03-05) X-Seq: 49885 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: 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 expect. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)