[slime-devel] openmcl utf-8 support
Takehiko Abe
keke at gol.com
Sat Apr 14 05:09:40 UTC 2007
OpenMCL 1.1 now supports unicode. The following adds utf-8 support
to slime.
;;; swank-openmcl.lisp
(defimplementation accept-connection (socket &key external-format
buffering timeout)
(declare (ignore buffering timeout
#-openmcl-unicode-strings external-format))
#+openmcl-unicode-strings
(when external-format
(let ((keys (ccl::socket-keys socket)))
(setf (getf keys :external-format) external-format
(slot-value socket 'ccl::keys) keys)))
(ccl:accept-connection socket :wait t))
#+openmcl-unicode-strings
(defvar *external-format-to-coding-system*
'((:iso-8859-1
"latin-1" "latin-1-unix" "iso-latin-1-unix"
"iso-8859-1" "iso-8859-1-unix")
(:utf-8 "utf-8" "utf-8-unix")))
#+openmcl-unicode-strings
(defimplementation find-external-format (coding-system)
(car (rassoc-if (lambda (x) (member coding-system x :test #'equal))
*external-format-to-coding-system*)))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: swank-openmcl.diff
Type: application/applefile
Size: 152 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/slime-devel/attachments/20070414/66c36673/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: swank-openmcl.diff
Type: application/octet-stream
Size: 1614 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/slime-devel/attachments/20070414/66c36673/attachment.obj>
More information about the slime-devel
mailing list