Re: mhbuild and long header fields

2023-08-23 Thread David Levine
Philipp wrote:

> I have had a quick look at fold() and just calling fold() would produce
> incorrect results. fold() just insert '\n ' after 76 characters[0]. But
> to correct fold a field you must insert a '\n' befor a whitespace.
>
> I'll try to implement a corrent fold funktion on the weekend.
>
> Philipp
>
> [0] I don't know if this is an issue in the context of ical

Good catch!  Yes, RFC 5322 folding for messages and RFC 5545
folding for ical are different.

Thank you.  This has bothered me for a long time.

David



Re: mhbuild and long header fields

2023-08-23 Thread Philipp
[2023-08-20 22:14] David Levine 
> Ken Hornstein wrote:
>
> > [Phillip wrote:]
> > >Or in output_headers(). I'm not sure if there an extra options would be
> > >required.
> >
> > That is one option.  Another is that repl(1) could do a better job; I
> > suppose that is the fault of mhl.
>
> mhl is used for display.  And a user can substitute their own
> filter for it.  We need to fold header fields when producing a
> message.
>
> I think that output_headers() is the right place.  It's the only
> place where header fields are output.
>
> There is a fold() function in sbr/mhical.c, maybe it could be
> moved to sbr and called from output_headers() for message and
> content part headers.  Those shouldn't need multibyte character
> support, though that wouldn't hurt.

I have had a quick look at fold() and just calling fold() would produce
incorrect results. fold() just insert '\n ' after 76 characters[0]. But
to correct fold a field you must insert a '\n' befor a whitespace.

I'll try to implement a corrent fold funktion on the weekend.

Philipp

[0] I don't know if this is an issue in the context of ical

> David