Subject: | utf8 encoding? |
I think setting utf8 encoding on the output filehandle (introduced in version 1.42) is wrong. At least this breaks creation of PDF files for me, when using the filename parameter (but not with fh). It's possible that the breakage only occurs if binary data is added to the PDF (e.g. images).
The effects:
- pdfinfo (from debian package poppler-utils) shows this error:
Syntax Error (230801): Illegal character '{'
- xpdf displays the PDF, but only with broken images, and shows a number of errors beginning with
Syntax Error (230801): Illegal character '{'
Syntax Error (225150): Bad LZW stream - unexpected code
- pdftk dumps core after showing these errors:
Unhandled Java Exception in create_output():
Unhandled Java Exception in main():
To reproduce (sorry, I don't have a small test case yet):
git clone https://github.com/eserte/bbbike
cd bbbike
perl t/bbbikedraw.t -only PDF -flushtofilename -nocompress -save
And inspect the generated file /tmp/bbbikedraw.pdf