From 4ffad9b0a60f40ee9717e22000c233fcba30b30d Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 21 Feb 2023 11:17:58 +0000 Subject: viewvcs: handle non-UTF-8 commit message Back in the old days, git didn't store commit encodings and allowed messages in various encodings to enter history. Assuming such a commit is UTF-8 trips up s/// operations on buffers read with the `:utf8' PerlIO layer. So clear Perl's internal UTF-8 flag if we end up with something which isn't valid UTF-8 An example is commit 7eb93c89651c47c8095d476251f2e4314656b292 in git.git ([PATCH] Simplify git script, 2005-09-07) --- xt/solver.t | 1 + 1 file changed, 1 insertion(+) (limited to 'xt') diff --git a/xt/solver.t b/xt/solver.t index 1b0af3d8..1f004bf5 100644 --- a/xt/solver.t +++ b/xt/solver.t @@ -30,6 +30,7 @@ my $todo = { '96f1c7f/s/', # TODO: b=contrib/completion/git-completion.bash 'b76f2c0/s/?b=po/zh_CN.po', 'c2f3bf071ee90b01f2d629921bb04c4f798f02fa/s/', # tag + '7eb93c89651c47c8095d476251f2e4314656b292/s/', # non-UTF-8 ], }; -- cgit v1.2.3-24-ge0c7