Re: How to change external-format in SBCL (c-string encoding error)
- From: Richard M Kreuter <kreuter@xxxxxxxxx>
- Date: Sun, 17 Jun 2007 13:27:13 -0400
Mathias Dahl <mathias.dahl@xxxxxxxxx> writes:
I get this error:<snip>
c-string encoding error (:external-format :ASCII):
the character with code 195 cannot be encoded.
[Condition of type SB-INT:C-STRING-ENCODING-ERROR]
Now, this only happens when my program is started as a system service
(I am running SBCL 1.0 under Mandriva GNU/Linux) but not if I start it
"manually" from the command line. I think I know why I get this
behavior but not how to solve the problem:
SBCL determines the default external format by examining the process
environment, see src/code/octets.lisp in the SBCL sources. Probably
your system is configured with a default locale of "C", but your
personal login profile sets some of the locale variables to something
more appropriate for you.
Any ideas on how to tackle this?
Set up appropriate variables for locale in the process environment in
which you invoke the SBCL instance, just like you would for any other
Unix program.
PS. It might be possible to tweak the script that defines the service
and change the default encoding there, but I am more interested in
learning how to solve this from inside SBCL.
I don't think there's a supported interface for changing these
settings once SBCL is running.
PPS. I have tried to search the documentation for encoding and formats
etc, to no avail. Is there any place where I could have found the
answer myself?
Not really. It's sort of assumed that the process environment that
SBCL finds itself in accurately describes the state of the operating
system, file systems, etc.
--
RmK
.
- Follow-Ups:
- Re: How to change external-format in SBCL (c-string encoding error)
- From: Mathias Dahl
- Re: How to change external-format in SBCL (c-string encoding error)
- References:
- How to change external-format in SBCL (c-string encoding error)
- From: Mathias Dahl
- How to change external-format in SBCL (c-string encoding error)
- Prev by Date: Re: A problem statement (and a proposed solution)
- Next by Date: Re: A problem statement (and a proposed solution)
- Previous by thread: Re: How to change external-format in SBCL (c-string encoding error)
- Next by thread: Re: How to change external-format in SBCL (c-string encoding error)
- Index(es):
Relevant Pages
|