fix graph problem if authorname or message isnot utf8 encoding

This commit is contained in:
Saito 2012-05-30 11:47:26 +08:00
parent efd9a717c1
commit c71a76e71a
2 changed files with 19 additions and 4 deletions

View file

@ -96,13 +96,13 @@ class GraphCommit
h[:parents] = self.parents.collect do |p|
[p.id,0,0]
end
h[:author] = author.name.force_encoding("UTF-8")
h[:author] = author.name
h[:time] = time
h[:space] = space
h[:refs] = refs.collect{|r|r.name}.join(" ") unless refs.nil?
h[:id] = sha
h[:date] = date
h[:message] = message.force_encoding("UTF-8")
h[:message] = message
h[:login] = author.email
h
end