emacsunicodeclojureslimeswank-clojure

Can't send funny chars to SLIME


Although I set UTF-8 everywhere (in my lein project, the slime-lisp group customization, the Emacs buffer itself...), I keep getting this error when trying to run code such as (def beta "β"):

Coding system iso-latin-1-unix not suitable [...]

Happens only in Emacs, not when running lein repl from the command line, for instance.

What could be causing it? I'm using Ubuntu, if that makes any difference.


Solution

  • you should have following code in your .emacs:

    (setq slime-net-coding-system 'utf-8-unix)
    

    and following in your project.clj when you run lein swank (or setup swank.encoding Java system property to utf-8):

    :encoding "utf-8"