[slime-devel] Unicode character misbehavior?
anton at sw4me.com
Sun Oct 30 22:09:12 UTC 2011
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. Emacs can set process-coding-system directly
when the process is already running, and it can be done upon request
from SWANK. It could be useful if there are indeed non-unicode,
_latin1-only_ Lisps out there.
Making swank resynchronize instead of disconnecting in such cases could
be beneficial as well, though it's not that easy. Some of unicode-aware
lisps, for example, might hate code points outside of basic multilingual
Regards, Anton Kovalenko
+7(916)345-34-02 | Elektrostal' MO, Russia
More information about the slime-devel