如何让quicklisp在粘液中加载rfc2388?

lin*_*des 5 sbcl common-lisp slime utf-8 quicklisp

我试图加载hunchentoot通过quicklisp煤泥,并得到以下错误:

READ error during COMPILE-FILE:

  :ASCII stream decoding error on
  #<SB-SYS:FD-STREAM
    for "file [redacted]/dists/quicklisp/software/rfc2388-20120107-http/rfc2388.asd"
    {100607B723}>:

    the octet sequence #(196) cannot be decoded.

  (in form starting at line: 29, column: 29,
  file-position: 1615)
[Condition of type ASDF:LOAD-SYSTEM-DEFINITION-ERROR]
Run Code Online (Sandbox Code Playgroud)

我试图运行时得到这个:

(ql:quickload "hunchentoot")
Run Code Online (Sandbox Code Playgroud)

或者干脆:

(ql:quickload "rfc2388")
Run Code Online (Sandbox Code Playgroud)

似乎其他人也得到了 这个.我找到了一个可能答案的暗示,说:

The system file is encoded as UTF-8. 
I'm not sure how to configure things so that SBCL on Windows starts with 
UTF-8 as its default encoding for loading sources, but that's what you 
need to do. 
Run Code Online (Sandbox Code Playgroud)

从那里,我已经尝试过(基于例如[this]将以下内容添加到我的emacs配置中:

(set-language-environment "UTF-8")
(setq slime-lisp-implementations
      '((sbcl ("/opt/local/bin/sbcl") :coding-system utf-8-unix)))
(setq slime-net-coding-system 'utf-8-unix)
Run Code Online (Sandbox Code Playgroud)

但是......即使完全重新启动emacs,我仍然会得到同样的错误,以确保我有一个新的Slime正在阅读上面的配置.

那么,我错过了什么,和/或我怎样才能加载它?

提前致谢!(更多的谢谢你的回答.)

p_l*_*p_l 2

您检查过您的区域设置吗?Emacs 配置仅告诉它为 SLIME 和 SWANK 之间的通信设置什么编码系统。

\n\n

您可以使用 /usr/bin/locale 检查区域设置,例如:

\n\n
navi ~ \xc2\xbb locale\nLANG=pl_PL.UTF-8\nLC_CTYPE=pl_PL.UTF-8\nLC_NUMERIC=pl_PL.UTF-8\nLC_TIME=pl_PL.UTF-8\nLC_COLLATE="pl_PL.UTF-8"\nLC_MONETARY=pl_PL.UTF-8\nLC_MESSAGES=C\nLC_PAPER=pl_PL.UTF-8\nLC_NAME="pl_PL.UTF-8"\nLC_ADDRESS="pl_PL.UTF-8"\nLC_TELEPHONE="pl_PL.UTF-8"\nLC_MEASUREMENT=pl_PL.UTF-8\nLC_IDENTIFICATION=pl_PL.UTF-8\nLC_ALL=\nnavi ~ \xc2\xbb\n
Run Code Online (Sandbox Code Playgroud)\n\n

正如您所看到的,除了显示“C”消息之外,我的到处都设置为 UTF-8。

\n

  • 将 `(setenv "LANG" "en_US.UTF-8")` 添加到我的 emacs init 文件中(并重新启动,作为重新启动 slime/sbcl 的一种懒惰方式)确实解决了问题。谢谢!(这个答案并没有完全给出这一点,但它为我指明了我需要的方向,对此表示赞赏。) (2认同)