Luis,
I updated my .emacs as follows and it worked
(set-language-environment "UTF-8") (load (expand-file-name "~/quicklisp/slime-helper.el")) (setq slime-net-coding-system 'utf-8-unix)
I'm still a little confused as to why the length is 4 and not 3 - shouldn’t the byte order mark have been discarded?
Many thanks!
Rob.
-----Original Message----- From: Luís Oliveira [mailto:luismbo@gmail.com] Sent: 12 April 2011 23:23 To: Rob Blackwell Cc: babel-devel@common-lisp.net Subject: Re: [babel-devel] octets-to-string with UTF8 and Byte Order Marker
Hello again,
On Wed, Apr 6, 2011 at 11:07 AM, Rob Blackwell rob.blackwell@aws.net wrote:
If I use (babel:octets-to-string foo) on a byte array with BOM markers, then my SBCL Lisp image dies.
I've tried this out and it works for me:
CL-USER> (babel:octets-to-string (babel-tests::ub8v 239 187 191 102 111 111)) "foo" CL-USER> (length *) 4
I'm guessing you're using SLIME and you haven't set your slime-net-coding-system to 'utf-8-unix or something similar. Have a look at the *inferior-lisp* when your Lisp crashes to see if that's the case.
HTH,
-- Luís Oliveira http://r42.eu/~luis/