From: Ralf M. <rm...@mh...> - 2009-06-18 08:21:19
|
On Wed, 17 Jun 2009 14:49:57 +0200, Michael Wessel wrote: > Hi all, > > I can't figure out a way to change the > SB-IMPL::*DEFAULT-EXTERNAL-FORMAT* to :utf-8 on Windows SBCL 1.0.29. > > Please consider the following example, which fails on Windows, but works > on Linux: > > CL-USER> SB-IMPL::*DEFAULT-EXTERNAL-FORMAT* > > :CP1252 > > CL-USER> (setf SB-IMPL::*DEFAULT-EXTERNAL-FORMAT* :utf-8) > > :UTF-8 > > CL-USER> (coerce (mapcar #'code-char '(40 105 110 115 116 97 110 99 101 > 32 12383 12429 12358 32 40 97 116 45 109 111 115 116 32 49 32 12365 > 12423 12358 12384 12356 12434 25345 12388 41 41) ) 'string) > > ;; swank:close-connection: encoding error on stream > #<SB-SYS:FD-STREAM for "a socket" {23B61D61}> > (:EXTERNAL-FORMAT :LATIN-1): > the character with code 12383 cannot be > encoded. > > Of course, but I wanted to use UTF-8, not :LATIN-1... But isn't this error related to the coding system used for emacs/SBCL communications, i.e. slime-net-coding-system? Does a (setq slime-net-coding-system 'utf-8-unix) in your emacs init help? Cheers, Ralf Mattes > With Linux version of SBCL 1.0.29 I get: > > * SB-IMPL::*DEFAULT-EXTERNAL-FORMAT* > > > :UTF-8 > > * (coerce (mapcar #'code-char '(40 105 110 115 116 97 110 99 101 32 > 12383 12429 12358 32 40 97 116 45 109 111 115 116 32 49 32 12365 12423 > 12358 12384 12356 12434 25345 12388 41 41) ) 'string) > > "(instance たろう (at-most 1 きょうだいを持つ))" * > > I found a number of related posts, but no clear answer to the question. > > Regards and thanks in advance > > Michael > > > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial Check out the new > simplified licensing option that enables unlimited royalty-free > distribution of the report engine for externally facing server and web > deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ Sbcl-help mailing list > Sbc...@li... > https://lists.sourceforge.net/lists/listinfo/sbcl-help |
From: Michael W. <mic...@gm...> - 2009-06-18 09:57:44
|
Am Donnerstag, 18. Juni 2009 10:19:59 schrieb Ralf Mattes: > On Wed, 17 Jun 2009 14:49:57 +0200, Michael Wessel wrote: > > Hi all, > > > > I can't figure out a way to change the > > SB-IMPL::*DEFAULT-EXTERNAL-FORMAT* to :utf-8 on Windows SBCL 1.0.29. > > > > Please consider the following example, which fails on Windows, but works > > on Linux: > > > > CL-USER> SB-IMPL::*DEFAULT-EXTERNAL-FORMAT* > > > > :CP1252 > > > > CL-USER> (setf SB-IMPL::*DEFAULT-EXTERNAL-FORMAT* :utf-8) > > > > :UTF-8 > > > > CL-USER> (coerce (mapcar #'code-char '(40 105 110 115 116 97 110 99 101 > > 32 12383 12429 12358 32 40 97 116 45 109 111 115 116 32 49 32 12365 > > 12423 12358 12384 12356 12434 25345 12388 41 41) ) 'string) > > > > ;; swank:close-connection: encoding error on stream > > #<SB-SYS:FD-STREAM for "a socket" {23B61D61}> > > (:EXTERNAL-FORMAT :LATIN-1): > > the character with code 12383 cannot be > > encoded. > > > > Of course, but I wanted to use UTF-8, not :LATIN-1... > > But isn't this error related to the coding system used for emacs/SBCL > communications, i.e. slime-net-coding-system? Does a > > > (setq slime-net-coding-system 'utf-8-unix) > > > in your emacs init help? Hi Ralf, Nikodemus Siivola has provided a patch (before posting to this list, I wrote to SBCL Launchpad / Answers). The setq above is only a partial solution. Regards and thanks Michael |