lib/cc/analyzer/source_fingerprint.rb in codeclimate-0.27.0 vs lib/cc/analyzer/source_fingerprint.rb in codeclimate-0.27.1

- old
+ new

@@ -19,10 +19,13 @@ attr_reader :issue def relevant_source source = SourceExtractor.new(raw_source).extract(issue.location) - source if source && !source.empty? + + if source && !source.empty? + source.encode(Encoding::UTF_8, "binary", invalid: :replace, undef: :replace, replace: "") + end end def raw_source @raw_source ||= File.read(issue.path) end