From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS16276 149.202.0.0/16 X-Spam-Status: No, score=-3.0 required=3.0 tests=AWL,BAYES_00,SPF_FAIL, SPF_HELO_FAIL shortcircuit=no autolearn=no autolearn_force=no version=3.4.0 Received: from 80x24.org (1.tor.exit.babylon.network [149.202.98.161]) by dcvr.yhbt.net (Postfix) with ESMTP id 2347A2022D for ; Sat, 13 Aug 2016 23:53:31 +0000 (UTC) From: Eric Wong To: spew@80x24.org Subject: [PATCH 5/8] mid: no wide characters for sha1_hex Date: Sat, 13 Aug 2016 23:53:17 +0000 Message-Id: <20160813235320.10831-5-e@80x24.org> In-Reply-To: <20160813235320.10831-1-e@80x24.org> References: <20160813235320.10831-1-e@80x24.org> List-Id: Apparently there are some really screwed up In-Reply-To fields out there. --- lib/PublicInbox/MID.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/PublicInbox/MID.pm b/lib/PublicInbox/MID.pm index 74a4875..b81fc15 100644 --- a/lib/PublicInbox/MID.pm +++ b/lib/PublicInbox/MID.pm @@ -26,6 +26,7 @@ sub id_compress { my ($id, $force) = @_; if ($force || $id =~ /[^\w\-]/ || length($id) > MID_MAX) { + utf8::encode($id); return sha1_hex($id); } $id; -- EW