From: Chris Morgan Date: Fri, 1 Apr 2022 04:28:14 +0000 (+1100) Subject: Fix UTF-8 mangling on patch and commitdiff_plain X-Git-Url: https://git.chrismorgan.info/gitweb/commitdiff_plain/c83ccd7eeefbc7b43977a7542ba6b0ac87dfe1aa Fix UTF-8 mangling on patch and commitdiff_plain 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. --- 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"; }