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}>)
* 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.
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
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