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: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 0FE9A20209 for ; Thu, 25 May 2017 02:38:39 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] import: reset :raw mode for commit title (subject) Date: Thu, 25 May 2017 02:38:39 +0000 Message-Id: <20170525023839.17620-1-e@80x24.org> List-Id: This was necessary for the presence of the 0xa0 byte(*) in the Subject: of the message at: http://blade.nagaokaut.ac.jp/ruby/ruby-core/3220 (*) That is 0xa0, not 0x0a ("\n"), so I wonder if the nibbles got swapped somehow. --- lib/PublicInbox/Import.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm index 13671a4..65da4dd 100644 --- a/lib/PublicInbox/Import.pm +++ b/lib/PublicInbox/Import.pm @@ -191,11 +191,10 @@ sub add { binmode $w, ':utf8' or die "binmode :utf8 failed: $!"; print $w "commit $ref\nmark :$commit\n", "author $name <$email> $date\n", - "committer $self->{ident} ", now2822(), "\n", - "data ", (bytes::length($subject) + 1), "\n", - $subject, "\n\n" or wfail; + "committer $self->{ident} ", now2822(), "\n" or wfail; binmode $w, ':raw' or die "binmode :raw failed: $!"; - + print $w "data ", (bytes::length($subject) + 1), "\n", + $subject, "\n\n" or wfail; if ($tip ne '') { print $w 'from ', ($parent ? $parent : $tip), "\n" or wfail; } -- EW