save actual Nokogiri chars
@@ -21,7 +21,9 @@ module Nokogiri
string = reencode(string)
end
- Nokogumbo.parse(string.to_s)
+ document = Nokogumbo.parse(string.to_s)
+ document.encoding = 'UTF-8'
+ document
end
# Fetch and parse a HTML document from the web, following redirects,
