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
"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__