From: republicat
Subject: *default-file-encoding*
Date: 
Message-ID: <6cefe6c600b88302c6f7fafbf983ce58@localhost.talkaboutprogramming.com>
ei, 
can someone please help on my problem:

I can't change the file encoding in LispBox

this code is working in ordinary Clisp but not in LispBox:

(setf *default-file-encoding* (make-encoding :charset charset:utf-8))



thnks in advance

--
Message posted using http://www.talkaboutprogramming.com/group/comp.lang.lisp/
More information at http://www.talkaboutprogramming.com/faq.html
From: Pascal J. Bourguignon
Subject: Re: *default-file-encoding*
Date: 
Message-ID: <7cy782rjhb.fsf@pbourguignon.anevia.com>
"republicat" <·············@gmail.com> writes:

> ei, 
> can someone please help on my problem:
>
> I can't change the file encoding in LispBox
>
> this code is working in ordinary Clisp but not in LispBox:
>
> (setf *default-file-encoding* (make-encoding :charset charset:utf-8))

You're surprized because you've used implementation specific stuff
without knowing it.

The fact is that CL allows implementations to import into the CL-USER
package anything they want.  clisp imports there a few packages
including EXT, where MAKE-ENCODING comes from.

But since that would mean that different LispBoxes using different
implementations would have different predefined stuff in CL-USER, the
LispBox cleans up the CL-USER package, and have it import only CL.

To access the MAKE-ENCODING symbol from the EXT package, you have two
possibilities:

1- fully qualify the symbol:  (ext:make-encoding :charset charset:utf-8)

2- import the EXT package:    (import "EXT") 
                              (make-encoding :charset charset:utf-8)

I'd prefer the first one, you've already used UTF-8 with full
qualification: CHARSET:UTF-8.


-- 
__Pascal Bourguignon__