Skip to content

Commit b4849d4

Browse files
committed
Fixed wide character warnings after removing encoding module.
1 parent a92732b commit b4849d4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

git-forest

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ use Getopt::Long;
1212
use Git;
1313
use strict;
1414
use utf8;
15+
use Encode qw(encode);
1516
my $Repo = Git->repository($ENV{"GIT_DIR"} || ".");
1617
my $Pretty_fmt = "format:%s";
1718
my $Reverse_order = 0;
@@ -123,7 +124,7 @@ sub process
123124
print &vis_post(&vis_commit($ra, " "));
124125
}
125126
if ($With_sha) {
126-
print $msg, $Color{at}, "──(", $Color{sha}, $mini_sha,
127+
print $msg, $Color{at}, encode('UTF-8', "──("), $Color{sha}, $mini_sha,
127128
$Color{at}, ")", $Color{default}, "\n";
128129
} else {
129130
print $msg, "\n";
@@ -211,7 +212,7 @@ sub ref_print
211212
} elsif ($symbol =~ m{^refs/(.*)}s) {
212213
print $Color{ref}, $1;
213214
}
214-
print $Color{at}, "]──", $Color{default};
215+
print $Color{at}, encode('UTF-8', "]──"), $Color{default};
215216
}
216217
}
217218

@@ -576,7 +577,7 @@ sub vis_post
576577
$s .= $f;
577578
}
578579

579-
return $Color{tree}, $s, $Color{default};
580+
return $Color{tree}, encode('UTF-8', $s), $Color{default};
580581
}
581582

582583
sub remove_trailing_blanks

0 commit comments

Comments
 (0)