When I evaluate
(code-char 8217)
in the SLIME repl, the Emacs connection to the Lisp process is lost. It looks like lisp is still running when I look at my ps output.
This is under Linux using LispWorks 5.0 and the latest CVS slime.
The *inferior-lisp* buffer has the message
;; swank:close-connection: #\U+2019 is not of type BASE-CHAR.
I assume this is some sort of encoding problem, but I'm not sure where.
Any ideas as to how to fix this?
Cheers, Chris Dean
Chris Dean ctdean@sokitomi.com writes:
When I evaluate (code-char 8217) in the SLIME repl, the Emacs connection to the Lisp process is lost.
I ended up using Brian Downing flexi-streams solution as described here:
http://common-lisp.net/pipermail/slime-devel/2006-May/004892.html
A current patch that depends upon flexi-streams is below.
Cheers, Chris Dean
--- swank-lispworks.lisp 10 Aug 2006 11:53:35 -0000 1.85 +++ swank-lispworks.lisp 5 Oct 2006 23:15:52 -0000 @@ -68,11 +68,18 @@ (defimplementation accept-connection (socket &key external-format buffering timeout) (declare (ignore buffering timeout)) - (assert (member external-format '(nil :iso-latin-1-unix))) + (let ((stream (let* ((fd (comm::get-fd-from-socket socket))) (assert (/= fd -1)) (make-instance 'comm:socket-stream :socket fd :direction :io - :element-type 'base-char))) + :element-type (ecase external-format + (:iso-latin-1-unix 'base-char) + (:utf-8-unix '(unsigned-byte 8)))))))+ (ecase external-format + (:iso-latin-1-unix stream) + (:utf-8-unix (flexi-streams:make-flexi-stream + stream :external-format :utf-8))))) +