nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] repl*comps and and non-ascii characters

2008-07-26 12:46:05
Peter Maydell <pmaydell(_at_)chiark(_dot_)greenend(_dot_)org(_dot_)uk> writes:

As far as I am aware nothing currently does that encoding, which was
my point. (I guess mh-e has done some kind of workaround -- we should
probably find out what exactly it does so we don't break it when we
add proper support in nmh proper.)

Ah, so we're worse off than I thought.  OK.  Can you still apply
the decode fix, so that my personal repl*comps files will work?
I reworked the test case to use its own replgroupcomps to test
the decode change.

Adding decode() calls to replcomps etc is in the 'master plan' (see
part F1), but you can't just do it as a standalone thing.

Glad to hear it.  When you do, you'll need this decode fix.  Or,
as I admitted earlier, some other fix.  I admit to not fully
understanding fmt_scan.c...

Index: ChangeLog
===================================================================
RCS file: /sources/nmh/nmh/ChangeLog,v
retrieving revision 1.278
diff -a -u -p -r1.278 ChangeLog
--- ChangeLog   25 Jul 2008 01:07:39 -0000      1.278
+++ ChangeLog   26 Jul 2008 19:44:51 -0000
@@ -1,5 +1,14 @@
 2008-07-24  Eric Gillespie  <epg(_at_)pretzelnet(_dot_)org>
 
+       * sbr/fmt_scan.c (fmt_scan): In the FT_LS_DECODE case, set value
+       non-zero if this field had contents, whether the contents needed
+       RFC 2047 decoding or not.
+
+       * test/tests/repl/test-decode: Test decode bug when used to decode
+       fields in assembled To/Cc fields in replgroupcomps.
+
+2008-07-24  Eric Gillespie  <epg(_at_)pretzelnet(_dot_)org>
+
        * test/setup-test: Run 'make clean' before building
 
 2008-07-24  Eric Gillespie  <epg(_at_)pretzelnet(_dot_)org>
Index: sbr/fmt_scan.c
===================================================================
RCS file: /sources/nmh/nmh/sbr/fmt_scan.c,v
retrieving revision 1.25
diff -a -u -p -r1.25 fmt_scan.c
--- sbr/fmt_scan.c      5 Apr 2008 18:41:37 -0000       1.25
+++ sbr/fmt_scan.c      26 Jul 2008 19:44:51 -0000
@@ -489,8 +489,11 @@ fmt_scan (struct format *format, char *s
            break;
 
        case FT_LS_DECODE:
-           if (str && decode_rfc2047(str, buffer2, sizeof(buffer2)))
-               str = buffer2;
+           if (str) {
+               if (decode_rfc2047(str, buffer2, sizeof(buffer2)))
+                   str = buffer2;
+               value = 1;
+           }
            break;
 
        case FT_LS_TRIM:


_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
http://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>