|
11 | 11 | use Getopt::Long; |
12 | 12 | use Git; |
13 | 13 | use strict; |
14 | | -use encoding "utf8"; |
| 14 | +use utf8; |
| 15 | +use Encode qw(encode); |
15 | 16 | my $Repo = Git->repository($ENV{"GIT_DIR"} || "."); |
16 | 17 | my $Pretty_fmt = "format:%s"; |
17 | 18 | my $Reverse_order = 0; |
@@ -123,7 +124,7 @@ sub process |
123 | 124 | print &vis_post(&vis_commit($ra, " ")); |
124 | 125 | } |
125 | 126 | if ($With_sha) { |
126 | | - print $msg, $Color{at}, "──(", $Color{sha}, $mini_sha, |
| 127 | + print $msg, $Color{at}, encode('UTF-8', "──("), $Color{sha}, $mini_sha, |
127 | 128 | $Color{at}, ")", $Color{default}, "\n"; |
128 | 129 | } else { |
129 | 130 | print $msg, "\n"; |
@@ -211,7 +212,7 @@ sub ref_print |
211 | 212 | } elsif ($symbol =~ m{^refs/(.*)}s) { |
212 | 213 | print $Color{ref}, $1; |
213 | 214 | } |
214 | | - print $Color{at}, "]──", $Color{default}; |
| 215 | + print $Color{at}, encode('UTF-8', "]──"), $Color{default}; |
215 | 216 | } |
216 | 217 | } |
217 | 218 |
|
@@ -576,7 +577,7 @@ sub vis_post |
576 | 577 | $s .= $f; |
577 | 578 | } |
578 | 579 |
|
579 | | - return $Color{tree}, $s, $Color{default}; |
| 580 | + return $Color{tree}, encode('UTF-8', $s), $Color{default}; |
580 | 581 | } |
581 | 582 |
|
582 | 583 | sub remove_trailing_blanks |
|
0 commit comments