Hi.
I'm using SLIME in the CVS tree on Carbon Emacs. The Common Lisp is SBCL 0.9.11 (MacOSX/PPC).
I encountered a bug when I tried to read Japanese files encoded in UTF-8 or EUC-JP. Here is my sample lisp code.
# (defun read-one-line (file enc) # (with-open-file (strm file :direction :input :external-format enc) # (read-line strm)))
And I have two files, one is encoded in UTF-8 and the other is in EUC- JP. It seems that reading either encodings results in the same behavior.
When I call the function in REPL,
# CL-USER> (read-one-line "test-utf8.txt" :utf-8)
the prompt never comes back. This doesn't happen when I directly execute sbcl in the bash (on Terminal.app).
In the *Messages* buffer of Emacs says:
# (read-one-line file enc) # Partially completed # Completed # (read-one-line file enc) # error in process filter: slime-process-available-input: Wrong type argument: listp, 000A600002A7 # error in process filter: Wrong type argument: listp, 000A600002A7
And when I look into the *inferior-lisp* buffer, SBCL (Swank?) is looping (maybe infinitely).
If this mailing list allows, I'd like to attach the japanese files and the *inferior-lisp* buffer log. Or is there suitable mail account to send them?
Thanks in advance. Yuhei.
+ Yuhei Kuratomi yuhei_k@mac.com:
| # (defun read-one-line (file enc) | # (with-open-file (strm file :direction :input :external-format enc) | # (read-line strm))) | | And I have two files, one is encoded in UTF-8 and the other is in EUC- | JP. It seems that reading either encodings results in the same | behavior. | | When I call the function in REPL, | | # CL-USER> (read-one-line "test-utf8.txt" :utf-8) | | the prompt never comes back.
Have you set up the proper coding system for communication between the lisp backend and slime? What happens if you just type in a string containing some Unicode characters at the prompt? (With quotes of course, so you expect to just get the string back.)
Here is how I set it up for slime (from my .emacs file):
(setq slime-lisp-implementations '((sbcl ("sbcl") :coding-system utf-8-unix) (cmucl ("cmucl") :coding-system iso-latin-1-unix)))
- Harald
On Apr 23, 2006, at 1:11 AM, Harald Hanche-Olsen wrote:
Have you set up the proper coding system for communication between the lisp backend and slime? What happens if you just type in a string containing some Unicode characters at the prompt? (With quotes of course, so you expect to just get the string back.)
Here is how I set it up for slime (from my .emacs file):
(setq slime-lisp-implementations '((sbcl ("sbcl") :coding-system utf-8-unix) (cmucl ("cmucl") :coding-system iso-latin-1-unix)))
- Harald
Thank you!! Setting the :coding-system solved the problem. I'm sorry for not noticing it although it is mentioned in the SLIME manual (Sec. 7.1) and CLiki (http://www.cliki.net/SLIME%20Tips).
Yuhei.