bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#79347: Bad formatting for ls with block-size 'k


From: Pádraig Brady
Subject: bug#79347: Bad formatting for ls with block-size 'k
Date: Sun, 31 Aug 2025 14:36:06 +0100
User-agent: Mozilla Thunderbird Beta

On 30/08/2025 09:15, Peter Laan wrote:
Hi,

I'm a GNU/Linux noob so maybe I'm doing something wrong. But see the
attached image for badly formatted output from ls -s1 --block-size=\'k. The
columns are not always aligned. This only happens when you have large files
in the directory. Everything looks fine with --block-size=k.

I'm running Arch with the latest updates. ls version 9.7.

The issue is that printf("*s", width, multi_byte_string) doesn't count
width appropriately. In your sv_SE.UTF-8 locale, the number grouping
character is 3 UTF8 bytes which messes up the alignment.

The attached should address this,
which I'll push later today.

Marking this as done.

thanks,
Padraig

Attachment: ls-block-align.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]