[slime-devel] Unicode character misbehavior?

Helmut Eller heller at common-lisp.net
Sun Oct 30 22:22:10 UTC 2011


* Anton Kovalenko [2011-10-30 22:09] writes:

> Alex Ott <alexott at gmail.com> writes:
>
>> as person, who uses Russian & German (& of course English), I vote for
>> this - for many people (at least from Russian-speaking community)
>> who're starting to use SLIME, this is almost standard problem, that
>> you need to explicitly setup encoding...
>>
>> Maybe one of solutions could be take encoding from LANG/LC_
>> environment variables? I did this for swank-clojure...
>
> UTF-8 default is probably good nowadays, because it takes time and
> concentration to dig out a non-unicode CL, and any person doing it is
> probably aware of possible troubles with external formats and encodings.
> Digging out a non-unicode emacs and running SLIME on it requires even
> more time and concentration, hopefully.
>
> Adding LANG and LC_* variables to the picture here is an extremely bad
> idea, not only because they can't be interpreted correctly without
> assistance of foreign libraries (nl_langinfo should be used instead when
> it's available). Locale encoding should be used by almost all CL
> _implementations_ (I make an obvious exception for ABCL here) to set up
> their default external form. For SLIME, we just want a widest common
> encoding supported by emacs _and_ CL, and it doesn't matter if the rest
> of the system uses another one.
>
> More robust solution would be an auto-negotiation thing I mentioned here
> earlier. We can simplify it by expecting utf8-aware emacs
> _unconditionally_, so SWANK server would _always_ use utf-8 when the
> implementation supports it.

Well, you also need to enforce that enable-multibyte-characters is true
on the Emacs side otherwise SLIME tries to insert multibyte strings into
unibyte buffers.  Anyway, enable-multibyte-characters is nil my
configuration.

Helmut





More information about the slime-devel mailing list