I'm trying to load hunchentoot via quicklisp in slime, and getting the following error:

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]

I get this when trying to run either:

(ql:quickload "hunchentoot")

Or simply:

(ql:quickload "rfc2388")

It seems that others are getting this too. I found one hint at a possible answer, saying:

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. 

From there, I've tried (based on e.g. [this] adding the following to my emacs config:

(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)

But... I still get the same error, even after completely re-starting emacs, to make sure I had a fresh Slime that was reading the above config.

So, what am I missing, and/or otherwise how can I get this to load?

Thanks in advance! (More thanks to come for a successful answer. ;)

有帮助吗?

解决方案

Have you checked your locale settings? Emacs configuration only tells it what coding systems to set for communication between SLIME and SWANK.

You can check for locale settings with /usr/bin/locale, for example:

navi ~ » locale
LANG=pl_PL.UTF-8
LC_CTYPE=pl_PL.UTF-8
LC_NUMERIC=pl_PL.UTF-8
LC_TIME=pl_PL.UTF-8
LC_COLLATE="pl_PL.UTF-8"
LC_MONETARY=pl_PL.UTF-8
LC_MESSAGES=C
LC_PAPER=pl_PL.UTF-8
LC_NAME="pl_PL.UTF-8"
LC_ADDRESS="pl_PL.UTF-8"
LC_TELEPHONE="pl_PL.UTF-8"
LC_MEASUREMENT=pl_PL.UTF-8
LC_IDENTIFICATION=pl_PL.UTF-8
LC_ALL=
navi ~ »

Mine is setup for UTF-8 everywhere, as you can see, except for displaying 'C' messages.

其他提示

Try this:

change into the .../quicklisp/dists/quicklisp/software/rfc2388* directory and load rfc2388.asd into a text editor. Move down to the :author parameter of the defsystem form. Replace the author's name by the name given at the top of the file. Store file using ASCII encoding.

Of course, when a new version of the library is published, the workaround gets lost. Or else store the modified project in local-projects.

With the original UTF-8 encoding still in effect, the DEBUGGER should present an INPUT-REPLACEMENT option to replace offending input characters by a replacement string. Choose that option, type "?" or "x" or any string you like at the prompt and then ENTER. The load then completes. Of course, that is not something you would like to do every time.

So the best idea is probably to send an email to the author and ask to provide an ascii version for quicklisp.

There should be a .cache directory in your HOME that contains all the fasl files. Sometimes removing those old fasl files seems to work for me when something goes wrong with compilation.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top