[slime-devel] UTF-8 support for slime in Lispworks back end
Alain Picard
Alain.Picard at accenture.com
Mon Sep 29 06:21:08 UTC 2008
Dear Slimers,
I've implemented support for Lispworks in slime so that
all characters exchanged between emacs and lispworks
are LW:SIMPLE-TEXT-STRING (vectors of LW:SIMPLE-CHAR) which
allow one to directly send and receive korean, japanese etc
characters from the REPL, and to hit C-c C-c on a utf-8
encoded file w/o blowing up the slime connection.
Example transcript:
XOS> (ui:caption 'are-you-sure-to-proceed)
"계속 하시겠습니까?"
XOS> (type-of *)
LISPWORKS:SIMPLE-TEXT-STRING
Limitations:
* You MUST have set your lispworks to use LW:SIMPLE-CHAR
by default. (see LW:SET-DEFAULT-CHARACTER-ELEMENT-TYPE)
For us, this is done at time of delivery for the text
console that we use to connect slime to.
* You MUST be in an image where a recent FLEXI-STREAMS
is loaded (i.e. :FLEXI-STREAMS must be on the features list.)
Failure to satisfy this reverts you to the previous,
broken behaviour. :-)
* Only 1 type of connection to lispworks is allowed; i.e.
you can't have one latin-1 and one utf-8 connection simultaneously.
This is because I couldn't find out how to inspect the current
connection to determine what external-format it had been opened
with. Maybe somebody can fix this.
* You can then set your emacs with this
(setq slime-net-coding-system 'utf-8-unix)
and have a UTF-8 interaction with lispworks.
This patch is taken against a (very recent) tip checkout, and
should apply cleanly, I hope.
Cheers!
Alain Picard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: slime-utf8.patch
Type: text/x-diff
Size: 4548 bytes
Desc: utf8 patch
URL: <https://mailman.common-lisp.net/pipermail/slime-devel/attachments/20080929/37ff9e5b/attachment.patch>
-------------- next part --------------
--
Please read about why Top Posting
is evil at: http://en.wikipedia.org/wiki/Top-posting
and http://www.dickalba.demon.co.uk/usenet/guide/faq_topp.html
Please read about why HTML in email is evil at: http://www.birdhouse.org/etc/evilmail.html
More information about the slime-devel
mailing list