Just Launched: You can now import projects and releases from Google Code onto SourceForge
We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps. Read More
I try to read a text file with a code equivalent to the one below:
(with-open-file (stream path :direction :input)
(dotimes (i numlines)
(let ((line (read-line stream)))
The problem is that the text file i try to read contains iso8859_1/Latin1
characters above code 128. Since sbcl seems to default to utf8
(with my locale anyway), this gives decoding errors, and the code crash
in read-line. How can I specify that a file is encoded with Latin1, and
not ascii or utf8.
Gisle Sælensminde, Phd student, Scientific programmer
Computational biology unit, BCCS, University of Bergen, Norway,
If I had more time, I would have written a shorter letter. (Blaise Pascal)
Gisle S=E6lensminde <Gisle.Salensminde@...> writes:
> How can I specify that a file is encoded with Latin1, and
> not ascii or utf8.
Use :external-format :latin1 in the call to OPEN.