On Wed, Aug 03, 2022 at 12:21:09PM +0900, Kenichi Asai wrote:
asai@bigsur % cat test.c
#include <stdio.h>
#include <ctype.h>

int main ()
{
 printf("%d\n", isspace(0xa0));
 printf("%d\n", isspace(0x85));
 printf("%d\n", isspace(0x0a));

 return 0;
}
[...]
asai@bigsur % ./test
0
0
1
asai@bigsur %

Darn, that was my best guess. After I sent the email, I even found some old bug reports that 0xa0 was considered "space" on MacOS (e.g. https://bugs.python.org/issue7072)

Still, perhaps there is something different about the way Mutt was built versus the quick compile.

Have you ever built Mutt yourself? Would you be able to try, and try applying the attached patch to a recent release tarball?

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA
From c2457b789989353db176ca3f899e838d9c67c0c2 Mon Sep 17 00:00:00 2001
From: Kevin McCarthy <ke...@8t8.us>
Date: Tue, 2 Aug 2022 20:51:17 -0700
Subject: [PATCH] wip: testing rfcline reader fix.

---
 parse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/parse.c b/parse.c
index 7ed1668f..95dea4bf 100644
--- a/parse.c
+++ b/parse.c
@@ -72,7 +72,7 @@ char *mutt_read_rfc822_line (FILE *f, char *line, size_t *linelen)
     if (*buf == '\n')
     {
       /* we did get a full line. remove trailing space */
-      while (ISSPACE (*buf))
+      while (is_email_wsp (*buf))
 	*buf-- = 0;	/* we cannot come beyond line's beginning because
 			 * it begins with a non-space */
 
-- 
2.35.1

Attachment: signature.asc
Description: PGP signature

Reply via email to