[cl-pdf-devel] deflate stream with sbcl
Roland Lohner
lohner.roland at gmail.com
Tue Feb 19 13:36:40 UTC 2008
Dear List,
the attached patch fixes a bug which makes sbcl users unable to compress pdf
streams using non unicode encodings.
The problem is with the function call (sb-ext:string-to-octets string :start
start :end end) in salza-deflate::string-to-octets.
salza-deflate::string-to-octets in cl-pdf gets strings only which can be
encoded with single byte encoding. (earlier functions map exceptional
characters of the used encoding as if it was a single-byte encoding) So it
should use sb-ext:string-to-octets with arguments :external-format
:iso-8859-1 to avoid re-encoding with non-single-byte or "non-identity"
encoding. (defult external format is: utf-8)
This fix works with unicode and non-unicode encodings, as well.
Please take a look at the attached patch. Unless there are objections or
suggestions, Attila Lendvai will commit it eventually.
Regards,
Roland Lohner
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cl-pdf-devel/attachments/20080219/b5b1ff77/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sbcl-deflate-stream.svndiff
Type: application/octet-stream
Size: 669 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/cl-pdf-devel/attachments/20080219/b5b1ff77/attachment.obj>
More information about the cl-pdf-devel
mailing list