From: Christophe Rhodes Date: Fri, 9 Dec 2011 18:20:04 +0000 (+0000) Subject: give us a chance with utf-8 X-Git-Url: http://christophe.rhodes.io/gitweb/?a=commitdiff_plain;h=a46793d3e275c91add4a5235bf1d812668714629;p=swankr.git 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 --- 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) }