From nobody Fri Aug 09 18:09:09 2024 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WgX3n6BZPz5SY9y for ; Fri, 09 Aug 2024 18:09:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WgX3n470rz4Ffm for ; Fri, 9 Aug 2024 18:09:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723226949; a=rsa-sha256; cv=none; b=pyRaqsxVXJT9WPpvfygOIfIRnSL4wVlo5hdWcCXCcsu+yrnbDgZd2Sca8dvhKUHQ5lbAJj qFp1W4Tz4h8Ec6x6mYy+JxXM73C9uOE9noIjqL9BFtv4kBNA6o6WZEXpVXmTFWPOiaBK/d LPUJ/rOnYc0tJl9JLq5bo6/d0RhmYNjLvLPEQAo5AXtTmrRnRmyMxo6i/KvOId78rB7B+s Dy6uBcBDYLBFKazm2+sPI2EqrB0n2lgdXU7A9P4Y6Z3CCZyP3/bn6CQ4YUZRPNroawi7wc ImuAjrFQU2kWvyjaGt6pqx9Azuv2rcQk5qI3aNqpksukHvo+Qoinq55chRtyyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723226949; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=N+w0PB+R1ILWgjUfRmpo+Kv37WbW/y0HYiDx33EYrcc=; b=NBSg4AuMs+B5Yl/dxXyQ8YBINu0cqmwsa7u+/fiYKt6UZ5HWpBIqZVTVXcWbAs/GcZHeTG gGjrRY3mDPQjyAv9N72j30Y3ZvmviMW++qle854rbU5RkeQj2K4VEB+u8HR76OfBJqUNwu gHwsnS503bP1MKxhINIwJvS8jyM/IaCvSERKxjAXtjtcLKJvBxtrjyXxreirM5kDFpK6oK YR3Jj+PfkccobvsiYX/ANFOHP3YklbrFYhBdE5Te8G1ov3J6CR6JGCyMF58IjVG99xdUlR dGFmxhT0ZRjH6m5cng08i3swUM3+if2/ctFwX43GtucbEHZ1UE4v0xpO2oDI7g== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WgX3n3kZrzRhv for ; Fri, 9 Aug 2024 18:09:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 479I99BO055052 for ; Fri, 9 Aug 2024 18:09:09 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 479I99B8055050 for bugs@FreeBSD.org; Fri, 9 Aug 2024 18:09:09 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 280543] df -, isn't columnated if the thousands separator is multi-byte Date: Fri, 09 Aug 2024 18:09:09 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: nabijaczleweli@nabijaczleweli.xyz X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D280543 --- Comment #5 from =D0=BD=D0=B0=D0=B1 = --- I mean, idk, probably not? This looks like exactly correct behaviour from printf(3) (and thus printf(1) I'm pretty sure). printf(3)'s widths, precisions, and the return value are in bytes (and wprintf(3)'s would be in wchar_ts), so $ out/cmd/printf "%'10d\n" 123456 | wc -L 10 $ LC_ALL=3Dpl_PL.UTF-8 out/cmd/printf "%'10d\n" 123456 | wc -L 8 is entirely correct, because $ out/cmd/printf "%'10d\n" 123456 | wc -c 11 $ LC_ALL=3Dpl_PL.UTF-8 out/cmd/printf "%'10d\n" 123456 | wc -c 11 The bug is in df, which needs to actually wcwidth(3)-measure the width of t= he result (so far it's avoided this problem by the device column being all 7-bit-clean and the mountedon column being last). --=20 You are receiving this mail because: You are the assignee for the bug.=