igor-alexandrov / wisepdf

Wkhtmltopdf wrapper done right
MIT License
281 stars 20 forks source link

invalid byte sequence in UTF-8 #8

Closed lluzak closed 12 years ago

lluzak commented 12 years ago

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.

igor-alexandrov commented 12 years ago

Thanks. Added binmode to wisepdf-1.2.3.