Date: Fri, 09 Aug 2024 18:09:09 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 280543] df -, isn't columnated if the thousands separator is multi-byte Message-ID: <bug-280543-227-WO59HZnKum@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-280543-227@https.bugs.freebsd.org/bugzilla/>
index | next in thread | previous in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280543 --- Comment #5 from наб <nabijaczleweli@nabijaczleweli.xyz> --- 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=pl_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=pl_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 the result (so far it's avoided this problem by the device column being all 7-bit-clean and the mountedon column being last). -- You are receiving this mail because: You are the assignee for the bug.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-280543-227-WO59HZnKum>
