lib/peddler/flat_file_parser.rb in peddler-2.0.4 vs lib/peddler/flat_file_parser.rb in peddler-2.1.0
- old
+ new
@@ -36,9 +36,10 @@
private
def scrub_body!(encoding)
return if body.encoding == Encoding::UTF_8
+
self.body = body.dup.force_encoding(encoding)
end
def extract_content_and_summary
@content = body.encode('UTF-8', invalid: :replace, undef: :replace)