diff --git a/lib/git_stats/git_data/blob.rb b/lib/git_stats/git_data/blob.rb index e824d98f9..3001a2aa2 100644 --- a/lib/git_stats/git_data/blob.rb +++ b/lib/git_stats/git_data/blob.rb @@ -22,7 +22,7 @@ module GitStats end def binary? - repo.run("git cat-file blob #{self.sha} | grep -m 1 '^'") =~ /Binary file/ + repo.run("git cat-file blob #{self.sha} | grep -m 1 '^'").force_encoding('ISO-8859-1').encode('utf-8', replace: nil) =~ /Binary file/ end def to_s