Christophe Weblog Wiki Code Publications Music
pass an :encoding stanza in the connection information
authorChristophe Rhodes <csr21@cantab.net>
Fri, 9 Dec 2011 10:44:36 +0000 (10:44 +0000)
committerChristophe Rhodes <csr21@cantab.net>
Fri, 9 Dec 2011 10:44:36 +0000 (10:44 +0000)
Allows slime-repl to start again.  I've said "utf-8-unix" but that is
almost certainly a lie; I have no real idea how R handles encodings of
text.  Simply passing in "ë" to the R slime repl breaks things without
too much effort.

swank.R

diff --git a/swank.R b/swank.R
index c50114a1a65769edbf5ffe856e2f8f13d5d29bb9..24393e674d4d4acb54336d10adda46dd9789b788 100644 (file)
--- a/swank.R
+++ b/swank.R
@@ -287,6 +287,7 @@ printToString <- function(val) {
 `swank:connection-info` <- function (slimeConnection, sldbState) {
   list(quote(`:pid`), Sys.getpid(),
        quote(`:package`), list(quote(`:name`), "R", quote(`:prompt`), "R> "),
+       quote(`:encoding`), list(quote(`:coding-systems`), list("utf-8-unix")),
        quote(`:lisp-implementation`), list(quote(`:type`), "R",
                                            quote(`:name`), "R",
                                            quote(`:version`), paste(R.version$major, R.version$minor, sep=".")))