CLISP Terminal error: Invalid byte sequence

2019-07-28 18:03发布

问题:

i have a problem while loading my source file inside terminal using clisp. if i execute the following command to load the file:

(load #p "filename.lisp") 

it gives me the following error:

SYSTEM::LINE-COMMENT-READER: Invalid byte sequence #xE0 #xA0 #x20 in
CHARSET:UTF-8 conversion

can someone please tell me what i need to do in order to load the file? thank you.

回答1:

Your file is encoded with ISO-8859-1:

$ file filename.lisp 
filename.lisp: ISO-8859 text, with no line terminators

Based on CLISP's documentation about encodings:

(load #P"filename.lisp" :external-format 'charset:iso-8859-1)