]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
numfmt: ensure fields don't split on nbsp
authorPádraig Brady <P@draigBrady.com>
Tue, 28 Oct 2025 12:18:47 +0000 (12:18 +0000)
committerPádraig Brady <P@draigBrady.com>
Tue, 28 Oct 2025 12:23:28 +0000 (12:23 +0000)
* src/numfmt.c (newline_or_blank): Explicitly ensure
we don't match NBSP as on platforms like NetBSD 10 or Solaris 11,
NBSP is considered a blank character.
This should have been part of commit v9.8-39-g8bc11f80a
Solaris 11 test failure reported by Bruno Haible.

src/numfmt.c

index 1ae831ba3f5d6ee6231db398a36c029ccf7b0526..8fc5b478a310965c3e93e974372c2be9bb393460 100644 (file)
@@ -216,7 +216,8 @@ static bool dev_debug = false;
 static bool
 newline_or_blank (mcel_t g)
 {
-  return g.ch == '\n' || c32isblank (g.ch);
+  return g.ch == '\n'
+         || (c32isblank (g.ch) && ! c32isnbspace (g.ch));
 }
 
 static inline int