Subject: bug#79300: fold-nbsp test failure

From: Collin Funk <[email-masked]>
Date: Thu, 28 Aug 2025 21:23:08 -0700

Pádraig Brady <[email-masked]> writes:

> Perhaps the techniques from tests/wc/wc-nbsp.sh could be used?
> Maybe something like:
>
> check_space() {
>   char="$1"
>   # Use -L to determine whether NBSP is printable.
>   # FreeBSD 11 and OS X treat NBSP as non printable ?
>   test "$(env printf "=$char=" | wc -L)" = 3 &&
>     test $(env printf "=$char=" | wc -w) = 2
> }
>
> if check_space '\u2007'; then
>   ...
> fi

Thanks for the suggestion, but that doesn't work. Any issue with
skipping based on $host_os for this test and for fold-spaces.sh?

I was thinking of testing "printf '\u00A0' | ./src/tr -d '[:blank:]'"
but that won't work since 'tr' operates on bytes and U+00A0 is
represented as 0xc2 0xa0 in UTF-8.

Collin