From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS24940 159.69.0.0/16 X-Spam-Status: No, score=-3.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 614D71F9F3 for ; Mon, 25 Oct 2021 05:42:21 +0000 (UTC) Date: Mon, 25 Oct 2021 07:42:17 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=t-8ch.de; s=mail; t=1635140539; bh=SlLWtKgCVNcx6hUs4iEN7q9UGp68D27tUuuHoscbARQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HInLOuSF1GLD3Xrg8CtlXzdEOwtsEaaHPklP61Esf8ckkGgSbefhnEr16dxnTpmJp 5mpsGV51wIlH10iCwj7rTtEJZ1kLZ8JCjvVnVYsoaOyiLYPx377ZXRW4VIjUANLtoN mB54uTtH/O7uE/XTwA2HMzASuFGUcmBeUNMG5+8o= From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: Eric Wong Cc: meta@public-inbox.org Subject: Re: [PATCH 3/3] mbox: Specify encoding for raw message display Message-ID: <3067cc07-95a3-4206-bd47-33785695d411@t-8ch.de> References: <20211024214337.161779-1-thomas@t-8ch.de> <20211024214337.161779-2-thomas@t-8ch.de> <20211024214337.161779-3-thomas@t-8ch.de> <20211025000824.GA20307@dcvr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20211025000824.GA20307@dcvr> Jabber-ID: thomas@t-8ch.de X-Accept: text/plain, text/html;q=0.2, text/*;q=0.1 X-Accept-Language: en-us, en;q=0.8, de-de;q=0.7, de;q=0.6 List-Id: Hi Eric, On 2021-10-25 00:08+0000, Eric Wong wrote: > Date: Mon, 25 Oct 2021 00:08:24 +0000 > From: Eric Wong > To: Thomas Weißschuh > Cc: meta@public-inbox.org > Subject: Re: [PATCH 3/3] mbox: Specify encoding for raw message display > > Thomas Weißschuh 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.