]> git.ipfire.org Git - thirdparty/coreutils.git/commit
fold: check that characters are not non-breaking spaces when -s is used
authorCollin Funk <collin.funk1@gmail.com>
Wed, 3 Sep 2025 03:08:20 +0000 (20:08 -0700)
committerCollin Funk <collin.funk1@gmail.com>
Thu, 4 Sep 2025 02:12:18 +0000 (19:12 -0700)
commit3a81d44d43b078ee20f1ce2b907c23d0926070b3
tree488419195f12280dfe9e99d9bbcbdf6fd57fb10c
parente09f2bc61193627764a02cce080c7145ee866c52
fold: check that characters are not non-breaking spaces when -s is used

NetBSD 10 and Solaris 11.4 treat non-breaking spaces as blank
characters unlike glibc.

* src/system.h: Include uchar.h.
(c32isnbspace): New function based on iswnbspace from src/wc.c.
* src/fold.c (fold_file): Use it.
* src/wc.c (iswnbspace): Remove function.
(maybe_c32isnbspace): New function.
(wc, main): Use it.
Fixes https://bugs.gnu.org/79300
src/fold.c
src/system.h
src/wc.c