Re: How to load files with Mac line ending?
Ronald Sudomo <[email protected]> Fri, 19 Aug 2005 12:08:48 -0600
| Newsgroups | gmane.lisp.allegro |
|---|---|
| Message-ID | <[email protected]> |
Thanks for the help everybody. I'll try the suggested solutions and read the docs. Just out of curiousity, why doesn't the Mac line ending be the default on ACL for Mac OS X? (although it's Unix underneath, it's still a Mac). Ideally it should handle both Unix and Mac line endings transparently. Is there some technical reason it doesn't do that? --ron On Aug 19, 2005, at 9:55 AM, Steve Haflich wrote: > > See the documentation on external-formats. The best place to find the > several things you need is by looking up "external" in the > documentation permuted index. But see especially section 5.0 of the > iacl document. > > For reading Mac line break conventions, you want an external format > composed with :e-cr (which is the Mac line conventions). You might > want this one > > cl-user(11): (find-external-format '(:latin1 :e-cr)) > #<external-format (:latin1-base :e-cr) @ #x71c4f3e2> > > If you are concerned only with cl:load, see the :external-format > argument to load (and compile-file, etc.). Otherwise, you might > execute something like > > (setf (excl:locale-external-format *locale*) > (find-external-format '(:latin1 :e-cr))) > > to change the default more-or-less globally, if that's really what you > want to do. > > Bill Gates and Steve Jobs each were shortsighted technical idiots for > adopting the conventions they did at the times they did. >