Force encoding to utf-8 for other characters

This commit is contained in:
Mike Rivera 2013-08-05 00:49:56 -04:00
parent d9a48df271
commit 53e3926833
1 changed files with 1 additions and 1 deletions

View File

@ -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