Fix UTF-8 mangling on patch and commitdiff_plain master
authorChris Morgan <me@chrismorgan.info>
committerChris Morgan <me@chrismorgan.info>
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

index d78c4f54abf5cb5aa2bdd4c64d8ae80e79a68013..5af873c02352cf67a25ef11e6a9301df0f19ee9e 100755 (executable)
@@ -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";
        }