From a46793d3e275c91add4a5235bf1d812668714629 Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Fri, 9 Dec 2011 18:20:04 +0000 Subject: [PATCH] give us a chance with utf-8 Calculate the length of the output to emacs using nchar(type="bytes") This makes help files sort-of work again --- swank.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swank.R b/swank.R index 24393e6..dea28cf 100644 --- a/swank.R +++ b/swank.R @@ -62,7 +62,7 @@ dispatch <- function(slimeConnection, event, sldbState=NULL) { sendToEmacs <- function(slimeConnection, obj) { io <- slimeConnection$io payload <- writeSexpToString(obj) - writeChar(sprintf("%06x", nchar(payload)), io, eos=NULL) + writeChar(sprintf("%06x", nchar(payload, type="bytes")), io, eos=NULL) writeChar(payload, io, eos=NULL) flush(io) } -- 2.39.5