]> Sergey Matveev's repositories - public-inbox.git/commitdiff
solvergit: avoid "Wide character" warnings
authorEric Wong <e@80x24.org>
Wed, 30 Jan 2019 03:31:12 +0000 (03:31 +0000)
committerEric Wong <e@80x24.org>
Wed, 30 Jan 2019 04:30:52 +0000 (04:30 +0000)
Just quiet Perl down, since we don't know or care about the
encoding of the patch we hand off to git-apply.

lib/PublicInbox/SolverGit.pm

index 891cde2087dbf55f6e6f738752c105f4dd94e027..1b1951b58e17a733f4396f258dcfac93abc0b7c0 100644 (file)
@@ -125,6 +125,7 @@ sub extract_diff ($$$$$) {
 
                        push @$hdr_lines, $l;
                        $di->{hdr_lines} = $hdr_lines;
+                       utf8::encode($_) for @$hdr_lines;
                        print $tmp @$hdr_lines or die "print(tmp): $!";
 
                        # for debugging/diagnostics:
@@ -153,6 +154,7 @@ sub extract_diff ($$$$$) {
                        $di->{path_b} = join('/', @b);
                        $hdr_lines = [ $l ];
                } elsif ($tmp) {
+                       utf8::encode($l);
                        print $tmp $l or die "print(tmp): $!";
                } elsif ($hdr_lines) {
                        push @$hdr_lines, $l;