Skip to content

Commit abdf18b

Browse files
author
invist@thinkpwn
committed
utf8 fix
Signed-off-by: invist@thinkpwn <cf@cw>
1 parent a4fbb6b commit abdf18b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/git/diff.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def process_full_diff
130130
if @full_diff.encoding.name != "UTF-8"
131131
full_diff_utf8_encoded = @full_diff.encode("UTF-8", "binary", { :invalid => :replace, :undef => :replace })
132132
else
133-
full_diff_utf8_encoded = @full_diff
133+
full_diff_utf8_encoded = @full_diff.encode("UTF-8", "UTF-8", { :invalid => :replace, :undef => :replace })
134134
end
135135
full_diff_utf8_encoded.split("\n").each do |line|
136136
if m = /^diff --git a\/(.*?) b\/(.*?)/.match(line)

0 commit comments

Comments
 (0)