user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: "Thomas Weißschuh" <thomas@t-8ch.de>
To: Eric Wong <e@80x24.org>
Cc: meta@public-inbox.org
Subject: Re: [PATCH 3/3] mbox: Specify encoding for raw message display
Date: Mon, 25 Oct 2021 07:42:17 +0200	[thread overview]
Message-ID: <3067cc07-95a3-4206-bd47-33785695d411@t-8ch.de> (raw)
In-Reply-To: <20211025000824.GA20307@dcvr>

Hi Eric,

On 2021-10-25 00:08+0000, Eric Wong wrote:
> Date: Mon, 25 Oct 2021 00:08:24 +0000
> From: Eric Wong <e@80x24.org>
> To: Thomas Weißschuh <thomas@t-8ch.de>
> Cc: meta@public-inbox.org
> Subject: Re: [PATCH 3/3] mbox: Specify encoding for raw message display
> 
> Thomas Weißschuh <thomas@t-8ch.de> 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	other threads:[~2021-10-25  5:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-24 21:43 [PATCH 1/3] t/watch_maildir: support non-master default branch Thomas Weißschuh
2021-10-24 21:43 ` [PATCH 2/3] t/git: " Thomas Weißschuh
2021-10-24 21:43   ` [PATCH 3/3] mbox: Specify encoding for raw message display Thomas Weißschuh
2021-10-25  0:08     ` Eric Wong
2021-10-25  5:42       ` Thomas Weißschuh [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3067cc07-95a3-4206-bd47-33785695d411@t-8ch.de \
    --to=thomas@t-8ch.de \
    --cc=e@80x24.org \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).