##// END OF EJS Templates
scm: prevent diff shows trace if UTF-8 is invalid in Ruby 1.9....
Toshi MARUYAMA -
r4792:111ae3c2e958
parent child
Show More
@@ -132,6 +132,10 module RepositoriesHelper
132 # do nothing here and try the next encoding
132 # do nothing here and try the next encoding
133 end
133 end
134 end
134 end
135 if str.respond_to?(:force_encoding)
136 str = str.encode("ASCII-8BIT", :invalid => :replace,
137 :undef => :replace, :replace => '?').encode("UTF-8")
138 end
135 str
139 str
136 end
140 end
137
141
General Comments 0
You need to be logged in to leave comments. Login now