[slime-devel] non-Latin1 character causes slime to disconnect

Quick way to cause problems: At the repl, do: (code-char 65533) Swank will disconnect. This is an unhandled condition regarding an external format encoding error. Ocurred with SBCL 0.9.4.65 and 09/28/2005 at 9:20 PM's slime CVS. The quick response is "don't do that" - but the character was ocurring in (I think) a backtrace from an external format error. Any assistance would be appreciated. Thanks, Alan

* Alan Shields [2005-09-29 04:51+0200] writes:
Any assistance would be appreciated.
Perhaps a little late, but... SLIME uses a character stream for the communication and we have to use certain encoding. The default encoding is latin-1, which can't represent your character. You can choose a different encoding by setting `slime-net-coding-system', e.g. to 'utf-8-unix if you have a Unicode capable Emacs. It's unfortunate that SLIME doesn't give better diagnostic messages in this case, but the error occurs at a very low level and it would be rather hard to recover from there. If you use non-latin1 chars, you should now what you're doing and you have to pay the price. Helmut.

On Sun, Oct 09, 2005 at 09:26:56PM +0200, Helmut Eller wrote:
* Alan Shields [2005-09-29 04:51+0200] writes:
Any assistance would be appreciated.
SLIME uses a character stream for the communication and we have to use certain encoding. The default encoding is latin-1, which can't represent your character. You can choose a different encoding by setting `slime-net-coding-system', e.g. to 'utf-8-unix if you have a Unicode capable Emacs.
It's unfortunate that SLIME doesn't give better diagnostic messages in this case, but the error occurs at a very low level and it would be rather hard to recover from there.
If you use non-latin1 chars, you should now what you're doing and you have to pay the price.
I was pulling text out of a database - I had no idea there were non-latin1 characters in there. I just got a swank disconnect while working with some values. SBCL has a restart that will skip the character it can't output - I know it's not in the standard, but it'd be a nice workaround for at least one backend. Thanks for the info on the coding system, that will solve my problem! Alan
participants (2)
-
Alan Shields
-
Helmut Eller