All Manuals > LispWorks User Guide and Reference Manual > 22 Internationalization > 22.6 External Formats and File Streams

NextPrevUpTopContentsIndex

22.6.2 Using complete external formats

If open or with-open-file gets a complete :external-format argument then, it is used as is. For example, this form opens an ASCII linefeed-terminated stream:

(with-open-file (ss "C:/temp/ascii-lf"
                    :direction :output 
                    :external-format 
                    '(:ascii :eol-style :lf)) 
  (stream-external-format ss))
=>
(:ASCII :EOL-STYLE :LF)

If you know the encoding of a file you are opening, then you should pass the appropriate :external-format argument.


LispWorks User Guide and Reference Manual - 21 Dec 2011

NextPrevUpTopContentsIndex