From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5416A3857BB3; Mon, 25 Sep 2023 13:50:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5416A3857BB3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1695649848; bh=OM3AE8dCwgN0V4vVPcrI43B6hXpzusj5E2sq0o8BveU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=dUPYYKoD+w0UQ7gKqC7bsjQY/o3uxwwMxLnNFkJ+Qy8dikYJlScRwpKpthSYfHrG9 v7m5BaMzT12kMA9/kif5lsgbdDRKZ8kRSAy/ew+LVuGIr9pWwOIZOpTCBKSsr0dCwV qvtOpcc0Vtc9cOCBVotC1IWPykpwvRfgFHkZSHfs= From: "vincent-srcware at vinc17 dot net" To: glibc-bugs@sourceware.org Subject: [Bug stdio/28943] printf field width specifier is inconsistent between %d and %f for multibyte output Date: Mon, 25 Sep 2023 13:50:47 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: stdio X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vincent-srcware at vinc17 dot net X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: security- X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D28943 Vincent Lef=C3=A8vre changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vincent-srcware at vinc17 = dot net --- Comment #3 from Vincent Lef=C3=A8vre --- Note that ISO C is involved too when the decimal-point character is encoded= on several bytes (e.g. in the ps_AF locale, 2 bytes in UTF-8). See bug 30883. (In reply to Florian Weimer from comment #0) > This only applies to the numeric conversions; for (non-wide) strings, fie= ld > width should continue to be measured in bytes, not multibyte characters. This alone would introduce an inconsistency. Note also that if you want column alignment, you would need to take into account the real width of the characters, which may take 0, 1 or 2 columns.= So the character count would not be correct. --=20 You are receiving this mail because: You are on the CC list for the bug.=