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-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 627081FA09 for ; Sun, 31 May 2020 23:09:03 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] wwwlisting: utf8::decode before undef Date: Sun, 31 May 2020 23:09:03 +0000 Message-Id: <20200531230903.1477-1-e@yhbt.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Assisted by commit a73957b5b05f2a00f7a85353b1658b6d8cde05ae ("testcommon: speed up wait_for_tail() on GNU/Linux") Fixes: 846161e3d1207d59 ("treat $INBOX_DIR/description and gitweb.owner as UTF-8") --- lib/PublicInbox/WwwListing.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/WwwListing.pm b/lib/PublicInbox/WwwListing.pm index a416d24f0e4..a3d4e2b3566 100644 --- a/lib/PublicInbox/WwwListing.pm +++ b/lib/PublicInbox/WwwListing.pm @@ -157,10 +157,10 @@ sub manifest_add ($$;$$) { chomp(my $owner = $git->qx('config', 'gitweb.owner')); chomp(my $desc = try_cat("$git_dir/description")); + utf8::decode($owner); + utf8::decode($desc); $owner = undef if $owner eq ''; $desc = 'Unnamed repository' if $desc eq ''; - utf8::decode($desc); - utf8::decode($owner); # templates/hooks--update.sample and git-multimail in git.git # only match "Unnamed repository", not the full contents of