diff --git a/lib/prawn/markup/processor.rb b/lib/prawn/markup/processor.rb index d2d9a03..1bfff44 100644 --- a/lib/prawn/markup/processor.rb +++ b/lib/prawn/markup/processor.rb @@ -49,7 +49,9 @@ def parse(html) reset html = Prawn::Markup::Normalizer.new(html).normalize - Nokogiri::HTML::SAX::Parser.new(self).parse(html) { |ctx| ctx.recovery = true } + Nokogiri::HTML::SAX::Parser.new(self, ::Encoding::UTF_8).parse(html) do |ctx| + ctx.recovery = true + end end def start_element(name, attrs = [])