On 28/10/2025 08:45, Collin Funk wrote:
Collin Funk <[email protected]> writes:

I tried to use function like:

     static bool
     newline_or_blank (mcel_t g)
     {
       return g.ch == '\n' || c32isblank (g.ch);
     }

But that didn't seem to work.

Copy pasted the wrong thing. I meant a new function like:

     static bool
     space (mcel_t g)
     {
       return c32isspace (g.ch) || c32isnbspace (g.ch);
     }

In attempt to skip all white space ignoring whether it is breaking.

We want the opposite like 
inhttps://github.com/coreutils/coreutils/commit/3a81d44d4so that fields are not 
split on NBSP,
so that the NBSP (and unit) is passed to the number parser.

I tested this on solaris 11, and pushed.

diff --git a/src/numfmt.c b/src/numfmt.c
index 1ae831ba3..8fc5b478a 100644
--- a/src/numfmt.c
+++ b/src/numfmt.c
@@ -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));
 }


cheers,
Padraig

Reply via email to