[Openmcl-devel] read error in ccl 1.9

R. Matthew Emerson rme at clozure.com
Mon Jun 16 19:38:52 PDT 2014

On Jun 16, 2014, at 9:40 PM, Mark Klein <m_klein at MIT.EDU> wrote:

> I have a file of s-expressions, which includes foreign language characters, that I am reading in as follows:
>  (defun test (file)
>     (with-open-file (stream file)
>       (loop while (read stream nil nil))))
> It reads the file without errors in ccl 1.8, but throws an error under 1.9:
> ? (test "/users/markklein/desktop/naples.text")
> > Error: Reader error: Illegal symbol syntax.
> > While executing: CCL::%PARSE-TOKEN, in process Listener(5).
> > Type cmd-. to abort, cmd-\ for a list of available restarts.
> > Type :? for other options.
> 1 > 
> Does anyone have any ideas what is going wrong, and how to fix it?

We changed the default external format to :utf-8 in the 1.9 release.  This is probably tripping you up.

Try specifying an appropriate external-format explicitly, e.g.,

(defun test (file)
  (with-open-file (stream file :external-format :iso-8859-1)
    (loop while (read stream nil nil))))

More information about the Openmcl-devel mailing list