From: remixer
Subject: sbcl error while reading a file from disk
Date: 
Message-ID: <1139688593.044704.313280@f14g2000cwb.googlegroups.com>
I am getting the following error while trying to read a file from disk.
Is there a quick fix?

Thanks,
Praveen.

decoding error on stream

#<SB-SYS:FD-STREAM for "file /home/data/GoodMessages.txt" {1002B9DFD1}>

(:EXTERNAL-FORMAT :UTF-8):

  the octet sequence (252 108 105 115) cannot be decoded.
   [Condition of type SB-INT:STREAM-DECODING-ERROR]

Restarts:
  0: [ATTEMPT-RESYNC] Attempt to resync the stream at a character
character boundary and continue.
  1: [FORCE-END-OF-FILE] Force an end of file.
  2: [ABORT-REQUEST] Abort handling SLIME request.
  3: [TERMINATE-THREAD] Terminate this thread (#<THREAD "repl-thread"
{100321E601}>)

From: Florian Weimer
Subject: Re: sbcl error while reading a file from disk
Date: 
Message-ID: <874q34kby0.fsf@mid.deneb.enyo.de>
* remixer:

> I am getting the following error while trying to read a file from disk.
> Is there a quick fix?
>
> Thanks,
> Praveen.
>
> decoding error on stream
>
> #<SB-SYS:FD-STREAM for "file /home/data/GoodMessages.txt" {1002B9DFD1}>
>
> (:EXTERNAL-FORMAT :UTF-8):
>
>   the octet sequence (252 108 105 115) cannot be decoded.
>    [Condition of type SB-INT:STREAM-DECODING-ERROR]

"252 108 105 115" is not a valid UTF-8 sequence.  Your input data is
malformed, or not in the UTF-8 charset.
From: Chris FORNO
Subject: Re: sbcl error while reading a file from disk
Date: 
Message-ID: <8axIf.48074$dW3.13288@newssvr21.news.prodigy.com>
remixer wrote:
> I am getting the following error while trying to read a file from disk.
>
> decoding error on stream
> 
> #<SB-SYS:FD-STREAM for "file /home/data/GoodMessages.txt" {1002B9DFD1}>
> 
> (:EXTERNAL-FORMAT :UTF-8):
> 
>   the octet sequence (252 108 105 115) cannot be decoded.
>    [Condition of type SB-INT:STREAM-DECODING-ERROR]

I ran into this problem while doing the spam filter exercise in 
Practical Common Lisp using the SpamAssassin corpus with SBCL. Try 
setting the external format to iso-8859-1:

(with-open-file (in file :external-format :iso-8859-1)
   ...

-Chris
From: David Sletten
Subject: Re: sbcl error while reading a file from disk
Date: 
Message-ID: <9tBIf.6989$Z3.2385@tornado.socal.rr.com>
Chris FORNO wrote:


> 
> I ran into this problem while doing the spam filter exercise in 
> Practical Common Lisp using the SpamAssassin corpus with SBCL. Try 
> setting the external format to iso-8859-1:
> 
> (with-open-file (in file :external-format :iso-8859-1)
>   ...
> 
> -Chris

Ha. I just ran across the same problem. Thanks for the hint.

Aloha,
David Sletten