[Openmcl-devel] Slime's utf-8-unix

Ben Hyde bhyde at pobox.com
Thu Oct 26 15:34:21 PDT 2006

Here's how I got openmcl's unicode support working with slime and  

In my lisp init I modified the how it should fire up openmcl.

(setf slime-lisp-implementations
	 ("/Users/bhyde/bin/openmcl" "--terminal-encoding" "utf-8")
	 :coding-system utf-8-unix)
	 :coding-system utf-8-unix)))

I also define a m-x command:

(defun openmcl () (interactive)
   (let ((slime-default-lisp 'openmcl)) (slime)))

Then I taught swank that how to deal with swank's utf-8-unix coding- 
system by replacing accept-connection's implementation in swank- 

(defimplementation accept-connection (socket
                                       &key external-format buffering  
   (declare (ignore buffering timeout))
   (let ((ef (or external-format :iso-latin-1-unix)))
       ((eq external-format :utf-8-unix)
        (let ((ccl:*default-socket-character-encoding* :utf-8)
              (ccl:*default-line-termination* :unix))
          (ccl:accept-connection socket :wait t)))
        (assert (eq ef :iso-latin-1-unix))
        (ccl:accept-connection socket :wait t)))))

I haven't tested this much, and presumably somebody who actually is  
fluent in swank and openmcl external coding would have done something  

More information about the Openmcl-devel mailing list