Hi Eric,

On 2021-10-25 00:08+0000, Eric Wong wrote:
> Date: Mon, 25 Oct 2021 00:08:24 +0000
> From: Eric Wong <[email protected]>
> To: Thomas Weißschuh <[email protected]>
> Cc: [email protected]
> Subject: Re: [PATCH 3/3] mbox: Specify encoding for raw message display
> 
> Thomas Weißschuh <[email protected]> wrote:
> > +++ b/lib/PublicInbox/Mbox.pm
> > @@ -58,10 +58,10 @@ sub res_hdr ($$) {
> >     my @hdr = ('Content-Type');
> >     if ($ctx->{ibx}->{obfuscate}) {
> >             # obfuscation is stupid, but maybe scrapers are, too...
> > -           push @hdr, 'application/mbox';
> > +           push @hdr, 'application/mbox; charset=UTF-8';
> >             $fn .= '.mbox';
> >     } else {
> > -           push @hdr, 'text/plain';
> > +           push @hdr, 'text/plain; charset=UTF-8';
> >             $fn .= '.txt';
> 
> Applied and pushed patches 1 + 2, thanks.  This (3/3) seems
> incorrect for non-UTF-8-compatible messages.

Thanks.

> I should have a better approach for this in the next day or so.
> The correct approach would be to use the Content-Type from the
> $eml object, but the $eml object isn't likely in memory when
> res_hdr() is called.
> 
> I was actually doing some surgery with the WwwStream /
> GzipFilter async response components earlier, soI'll probably
> get reading charset supported, soon.

I'll take a look at it.

> Thanks for bringing this up.

Thanks for taking care.

Reply via email to