[slime-devel] using chinese characters in SLIME

Helmut Eller heller at common-lisp.net
Sun Jul 26 08:25:08 UTC 2009

* Andrew Webb [2009-07-26 05:32+0200] writes:

> I'm having problems with this UTF-8 encoded file, as per log below. The file
> can be displayed by emacs, so MULE is OK (if that's relevant).
> What you see here is NOT what I get if I enter the same code directly into
> the native lisp REPL (outside emacs).
> Coding-system & net-coding system are both utf8 - any ideas? I'm new (very)
> at lisp/emacs/slime, but it seems to be a slime-related issue. Emacs 22.3,
> CLisp 2.47

You could try `M-x set-language-environment' UTF-8 RET.
Only affects new buffers, so it has to be done before creating Slime
related buffers.

> Log:
> ;; Swank started at port: 3839.
> CL-USER> (with-open-file (infile "d:/backup/my documents/personal/
> wode.u8.txt") (read infile))

It might be necessary to call with-open-file with an :external-format
argument, like

 (with-open-file (infile filename :external-format '(:charset "utf-8")) 

CLISP might assume a different environment if it runs inside Emacs.


More information about the slime-devel mailing list