On 22/09/2025 04:08, Paul Eggert wrote:
On 2025-09-21 15:45, Pádraig Brady wrote:
Alternatively one could get better alignment in this case
by not passing MBSW_REJECT_UNPRINTABLE when aligning.
That would give unprintable characters a width of 1.

Sounds dicey, as we have no way to know the width of a random control
character. On the other hand, it seems like U+00A0 is a longstanding
special case with FreeBSD wcwidth; see:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219800

so perhaps we should make a special case for 0xA0 on FreeBSD.

There are similar issues in ls and numfmt, I suppose.

Goood point on the control chars, but mbswidth() does
special case those, counting them as 0 width.
Anyway this is not an issue for current FreeBSD,
so let's be conservative before the release
and just apply the test fix which is needed in either case
(since wc -L treats all non printable as zero width).

thank you,
Padraig

Reply via email to