igor-alexandrov/wisepdf

invalid byte sequence in UTF-8

lluzak opened this issue · 1 comments

Recently in my project i updated Wisepdf from 1.0.0 to 1.2.2 and we encounter problem with encoding:

1.9.3-p0 :002 > content = Wisepdf::Writer.new.to_pdf("Hello World")
1.9.3-p0 :002 > content.blank?
ArgumentError: invalid byte sequence in UTF-8
        from (irb):2

To fixed this issue i added again binmode option to Open3.popen3 in to_pdf method in Writer.

Thanks.
Added binmode to wisepdf-1.2.3.