[cl-pdf-devel] Fwd: cl-pdf encoded in iso-8859-15, crashes ql:quickload with utf-8

Hraban Luyat hraban at 0brg.net
Sat Mar 26 14:54:59 UTC 2011


Hello cl-pdf maintainers,

A problem arises when loading cl-pdf through quicklisp. I reported the
error to their mailing listed and they pointed me to you. The problem
is that the files seem to be encoded in latin1, which is a problem
when you load them without specifying the encoding explicity. If your
default encoding (utf-8 in my case) is incompatible with latin1, you
get an error. In this case, the ñ in one of the comments yields a byte
sequence incompatible with utf-8 if encoded in latin1.

While I am not exactly sure what they want you to do about this, I was
hoping maybe you could at least give your opinion on the matter.

Greetings,

Hraban Luyat


---------- Forwarded message ----------
From: Hraban Luyat <hraban at 0brg.net>
Date: 2011/3/26
Subject: cl-pdf encoded in iso-8859-15, crashes ql:quickload with utf-8
To: quicklisp at googlegroups.com


Hi,

Compare this normal run:

[1]> (ql:quickload "cl-pdf")
To load "cl-pdf":
 Load 1 ASDF system:
   iterate
 Install 1 Quicklisp release:
   cl-pdf
; Loading "cl-pdf"
[package pdf].......
*** - SYSTEM::LINE-COMMENT-READER: Invalid byte sequence #xF1 #x6F
#x7A #x0A in CHARSET:UTF-8
     conversion

With:

[1]> (setf *default-file-encoding* charset:iso-8859-15)
#<ENCODING CHARSET:ISO-8859-15 :UNIX>
[2]> (ql:quickload "cl-pdf")
To load "cl-pdf":
 Load 1 ASDF system:
   iterate
 Install 1 Quicklisp release:
   cl-pdf
; Loading "cl-pdf"
[package pdf].........
("cl-pdf")


The problem is with pdf-geom.lisp in the cl-pdf package, line 7:

;;; Geometry functions contributed by Eduardo Muñoz

This file is encoded in latin1/iso-8859-15 and the comment trips GNU CLISP.

Who is at fault, here? cl-pdf for not defining the file encoding in
the source? quicklisp for not explicitly setting
*default-file-encoding*?

Anyhow, this is a workaround to load cl-pdf with quicklisp if you load
in utf-8 by default.

Greetings,

Hraban Luyat




More information about the cl-pdf-devel mailing list