Subject: [clisp-list] FAQ

From: Susana Fern?ndez Arregui <[email-masked]>
Date: Tue Jul 8 07:09:16 2003

When I try to load a file with Spanish characters (?, ?, ?, ?, ? or ?) the
following error message appears:

*** - invalid byte #xF3 in CHARSET:ASCII conversion

In the Troubles section said:
"This means that you are trying to read ("invalid byte") or write 
("character
cannot be represented") a non-ASCII character from (or to) a character 
stream
which has ASCII STREAM-EXTERNAL-FORMAT. The default is described in The Fine
Manual."

so, I've added in the $HOME/.clisprc.lisp:

#+unicode
(setf custom:*default-file-encoding*
(ext:make-encoding :charset "ISO-8859-1" :line-terminator :unix))

but the error remains.

I have LINUX (Debian).

Is there any solution for this problem?

Thank you,

---

From: Sam Steingold <[email-masked]>
Date: Tue Jul 8 07:37:01 2003

> * In message <[email-masked]>
> * On the subject of "[clisp-list] FAQ"
> * Sent on Tue, 08 Jul 2003 16:09:44 +0200
> * Honorable =?windows-1252?Q?Susana_Fern=3Fndez_Arregui?= <[email-masked]> writes:
>

please give us a specific transcript of what you do.
what commands? in what order?

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
Lisp: Serious empowerment.

---

From: Carlo Traverso <[email-masked]>
Date: Tue Jul 8 09:53:11 2003

A somehow connected problem:

if I have in my home directory a file whose name contains an 8-bit,
non-ASCII character (in my case it was an ISO--8859-1
#\LATIN_SMALL_LETTER_E_WITH_ACUTE ) and no .cshrc file, I get (before
the prompt) the error

*** - invalid byte sequence #xE9 #x72 #x61 in CHARSET:UTF-8 conversion
1. Break [1]>

The problem disappears with a .clisprc file or with clisp -norc , so
it should be a directory search done in unicode.

Carlo Traverso

---

From: Sam Steingold <[email-masked]>
Date: Tue Jul 8 10:11:19 2003

> * In message <[email-masked]>
> * On the subject of "Re: [clisp-list] FAQ"
> * Sent on Tue, 8 Jul 2003 18:52:15 +0200
> * Honorable Carlo Traverso <[email-masked]> writes:
>

of course.
CLISP looks for .clisprc and this means calling DIRECTORY.
if .clisprc appears before the non-ASCII file, you are fine.

the solution: <http://clisp.cons.org/clisp.html#opt-enc>
<http://clisp.cons.org/impnotes.html#path-enc>

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
Sufficiently advanced stupidity is indistinguishable from malice.

---

From: Carlo Traverso <[email-masked]>
Date: Tue Jul 8 10:57:04 2003

>>>>> "Sam" == Sam Steingold <[email-masked]> writes:

    >> * In message <[email-masked]> * On
    >> the subject of "Re: [clisp-list] FAQ" * Sent on Tue, 8 Jul 2003
    >> 18:52:15 +0200 * Honorable Carlo Traverso
    >> <[email-masked]> writes:
    >> 
    >> if I have in my home directory a file whose name contains an
    >> 8-bit, non-ASCII character (in my case it was an ISO--8859-1
    >> #\LATIN_SMALL_LETTER_E_WITH_ACUTE ) and no .cshrc file, I get
    >> (before the prompt) the error
    >> 
    >> *** - invalid byte sequence #xE9 #x72 #x61 in CHARSET:UTF-8
    >> conversion 1. Break [1]>
    >> 
    >> The problem disappears with a .clisprc file or with clisp -norc
    >> , so it should be a directory search done in unicode.

    Sam> of course.  CLISP looks for .clisprc and this means calling
    Sam> DIRECTORY.  if .clisprc appears before the non-ASCII file,
    Sam> you are fine.

    Sam> the solution: <http://clisp.cons.org/clisp.html#opt-enc>
    Sam> <http://clisp.cons.org/impnotes.html#path-enc>

Why a DIRECTORY, and not a PROBE-FILE? This could avoid a catch-22
situation (you cannot set the encoding in .clisprc before it is read -
of course you can on the command line, but avoiding the error should
be better).

Carlo

---

From: Sam Steingold <[email-masked]>
Date: Tue Jul 8 11:09:06 2003

> * In message <[email-masked]>
> * Sent on Tue, 8 Jul 2003 19:56:28 +0200

because LOAD has to search *LOAD-PATH*.
see SEARCH-FILE in init.lisp for details.

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
Binaries die but source code lives forever.