From c83ccd7eeefbc7b43977a7542ba6b0ac87dfe1aa Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Fri, 1 Apr 2022 15:28:14 +1100 Subject: [PATCH] Fix UTF-8 mangling on patch and commitdiff_plain MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Look, I don’t really understand why I need to add most of these to_utf8 calls that I’ve been doing, as I think it’s all already supposed to be in UTF-8 mode, but eh, it fixes the problems, so I’ll do it. --- gitweb.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gitweb.cgi b/gitweb.cgi index d78c4f5..5af873c 100755 --- a/gitweb.cgi +++ b/gitweb.cgi @@ -8059,12 +8059,12 @@ sub git_commitdiff { } elsif ($format eq 'plain') { local $/ = undef; - print <$fd>; + print to_utf8(<$fd>); close $fd or print "Reading git-diff-tree failed\n"; } elsif ($format eq 'patch') { local $/ = undef; - print <$fd>; + print to_utf8(<$fd>); close $fd or print "Reading git-format-patch failed\n"; } -- 2.42.0