hello,
i must read a file encoded in utf-8 if i read this file from sbcl started in an xterm, i haven't got any error. i try to make this operation in my SLIME environment, but i have an error. so i put this in my emacs's configuration :
(setq slime-net-coding-system 'utf-8-unix)
but after this i can't start slime this is the error :
Debugger entered--Lisp error: (cl-assertion-failed default-enable-multibyte-characters) signal(cl-assertion-failed (default-enable-multibyte-characters)) (or default-enable-multibyte-characters (signal (quote cl-assertion-failed) (list ...))) (progn (or default-enable-multibyte-characters (signal ... ...)) nil) (assert default-enable-multibyte-characters) (progn (assert default-enable-multibyte-characters)) (if (and (second props) (boundp ...)) (progn (assert default-enable-multibyte-characters))) (when (and (second props) (boundp ...)) (assert default-enable-multibyte-characters)) (let ((props ...)) (unless props (error "Invalid slime-net-coding-system: %s. %s" coding-system ...)) (when (and ... ...) (assert default-enable-multibyte-characters)) t) slime-check-coding-system(utf-8-unix) (let ((args ...)) (slime-check-coding-system coding-system) (when (or ... ...) (let ... ... ...))) (catch (quote --cl-block-slime-start--) (let (...) (slime-check-coding-system coding-system) (when ... ...))) (cl-block-wrapper (catch (quote --cl-block-slime-start--) (let ... ... ...))) (block slime-start (let (...) (slime-check-coding-system coding-system) (when ... ...))) (let* ((program ...) (program-args ...) (coding-system ...) (init ...) (name ...) (buffer ...)) (let (...) (while --cl-keys-- ...)) (block slime-start (let ... ... ...))) slime-start(:program "/usr/bin/sbcl" :program-args nil) apply(slime-start (:program "/usr/bin/sbcl" :program-args nil)) slime() call-interactively(slime) execute-extended-command(nil) call-interactively(execute-extended-command)
have you got an idea for this problem ? thanks
+ Nicolas Lamirault lam@tuxfamily.org:
| i must read a file encoded in utf-8 | if i read this file from sbcl started in an xterm, | i haven't got any error. | i try to make this operation in my SLIME environment, but i have an | error.
You should always be able to read your utf-8 encoded file, no matter what coding system you are using with slime. Just use :external-format :utf-8 when opening the file. But if you wish to be able to print bits of that file using utf-8 to the interaction stream, you will need utf-8 support from slime, of course.
| so i put this in my emacs's configuration : | | (setq slime-net-coding-system 'utf-8-unix) | | but after this i can't start slime
FWIW, I don't use this variable in my setup. Instead I have this:
(setf slime-lisp-implementations '((sbcl ("sbcl") :coding-system utf-8-unix) (cmucl ("cmucl") :coding-system iso-latin-1-unix)))
and this works fine for me. Make sure you have a recent slime (from 2006).
- Harald
* Nicolas Lamirault [2006-02-11 12:52+0100] writes:
hello,
i must read a file encoded in utf-8 if i read this file from sbcl started in an xterm, i haven't got any error. i try to make this operation in my SLIME environment, but i have an error. so i put this in my emacs's configuration :
(setq slime-net-coding-system 'utf-8-unix)
but after this i can't start slime this is the error :
Debugger entered--Lisp error: (cl-assertion-failed default-enable-multibyte-characters)
To use utf8 with SLIME you should set default-enable-multibyte-characters to t before connecting. It is true by default and if you aren't sure what it does, it's better to set it to t. Emacs uses two internal text representations and the distinction between those representation is, unfortunately, very visible at the Elisp level, e.g. weird things happen when a unibyte string is inserted in a multibyte buffer. To reduce such problems with SLIME, we enforce that default-enable-multibyte-characters is true (and that most text will be in multibyte representation).
All this only applies to Emacs; XEmacs has apparently a much cleaner design in this regard.
Helmut.