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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 5720 invoked from network); 12 Jun 2023 20:53:42 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 12 Jun 2023 20:53:42 -0000 Received: (qmail 5950 invoked by uid 550); 12 Jun 2023 20:53:38 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 5914 invoked from network); 12 Jun 2023 20:53:38 -0000 ARC-Seal: i=1; a=rsa-sha256; t=1686603205; cv=none; d=strato.com; s=strato-dkim-0002; b=dxdcujtHk+EeoV5Wll99za/5Vi1dF1wb1kjiNVojZ3bEOZsl7VMGdsozThfT5c4Utq 7WduBc7hoErbxV6IXoZ9h19wK4OpLIkLtsb8w3+jb5AhuCTA0vNKYZU3rZH9SBBy4uxh NsN2pWsnbzzk+OfG/36/B2hgS+DqWPlVlGptxa8VOi6+wkVJ9b70d3gmykaNIHDqJunP LBiCtA81uA5MHrz970DV1Vseyytk2cBhfh/mEvd6VHUON4V4vjdEWNJJlMCfiLMeu02s i1VzPWbRqjeRDOl2QQacFm+/ibbj9gP/sl3fpBiT+DRblO5lBiQbWojsQYEXUDKm/rBy cnAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1686603205; s=strato-dkim-0002; d=strato.com; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=MRKJ/nidMUaC1jLqeVi53Sbkdrlk2LbOs58nZNBz0B4=; b=ta2A2i9R0AoPRmrUOrcQMx4yovLIIJvOUXlmD60LccgEdKsCljg6PrjpMEcofz2fNv lfxVL0Y9R6zTRlR1WSNvLTiRHxaZ+pii5ftZX7W78cRwEKZtq+rZyAG+4isPwV56jJwp oMR5bXIl21zbyIJepdGlssjKCwFD8y3qVIYcrK5SMlqICnddA67mFusMx+15v3ePQsmN lMDhzHunWMe/FbE9YRKDL5ICoann5FNbpBDfV4MZNoV0yDuFN3OxRfmPjH4BtDye8bT0 7vNuvg8pjYphljp5XbMibboJBF1Zo/QWe5KWyllUvqH/5lxKMAxU3v1oCuixI2+jOtys GlCQ== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1686603205; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=MRKJ/nidMUaC1jLqeVi53Sbkdrlk2LbOs58nZNBz0B4=; b=svJj5iFWosHyLbfnjqvW/NphIu8QfwxwizRhcM7PmWRRFbScr9xfuz8MUgvvC0ysbz qE8wsOYo5uvw1SryUN7Ko/yQf8VcKCOoD5P41o2FFCq55FE+s1CeV9Tv5S6Oe3N8GdZn 5LUjoeunmrsyJUq3DV3H4eAs18i+FdDVYpcu4CV26zCBtq1MP+W4NHmfwvrMdWPT9HHX RCk4M8kVbBY24MReFxXWpNJCkwiALNmW32xF18zjrFk1d9FlVeJiAxlXZNLGJNaO4OUY EVfbBJQQyHKW6NTlDTG9kndOI9ksggOmyyJfcWLUP28ZIBc5VS4BKqBOlhsergv2Yg2l bbUg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1686603205; s=strato-dkim-0003; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=MRKJ/nidMUaC1jLqeVi53Sbkdrlk2LbOs58nZNBz0B4=; b=j5UXpYmYa/B1RDVZRpEZGBM+I9553Ew/hMtW23sb0JxVTMOQ/s1Bj70u6YDyTa5+cD pD1C5Yd4VbYxzjUWVZCw== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH0WWb0LN8XZoH94zq68+3cfpPH2veC/hGrK50o7BgC1vUoZL6PCg==" From: Bruno Haible To: Rich Felker Cc: musl@lists.openwall.com Date: Mon, 12 Jun 2023 22:53:24 +0200 Message-ID: <4793858.F8r316W7xa@nimes> In-Reply-To: <20230612202728.GB4163@brightrain.aerifal.cx> References: <2976941.0vhOF50zNu@nimes> <20230612202728.GB4163@brightrain.aerifal.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Subject: Re: [musl] swprintf %lc directive does not work for some wide characters Rich Felker wrote: > Per my reading of the specification, this is not a bug but is the > expected behavior. >=20 > In addition, all forms of fwprintf() shall fail if: >=20 > [EILSEQ] > A wide-character code that does not correspond to a valid > character has been detected. =46rom my reading of ISO C, it's a bug. Namely, in ISO C 23 =A7 7.31.2.3 the error conditions are specified as "The swprintf function returns the number of wide characters written in the array, not counting the terminating null wide character, or a negative value if an encoding error occurred or if n or more wide characters were requested to be written." In swprintf, where "the wint_t argument converted to wchar_t" is written and the output is to a wchar_t[], no "encoding error" should be possible. That's obvious. The "encoding errors" occur in %c and %s directives, AFAIU, not in %lc and %ls directives. Bruno