Re: impnotes documentation for encodings
Kaz Kylheku <[email protected]> Tue, 22 Sep 2020 09:26:12 -0700
| Newsgroups | gmane.lisp.clisp.general |
|---|---|
| Message-ID | <[email protected]> |
On 2020-09-22 09:00, [email protected] wrote: > 31.5.4. Function EXT:MAKE-ENCODING > describes the function > (EXT:MAKE-ENCODING &KEY > :CHARSET :LINE-TERMINATOR :INPUT-ERROR-ACTION :OUTPUT-ERROR-ACTION) > I don't see any ways of reading or writing any of these components, > other than > 31.5.5. Function EXT:ENCODING-CHARSET > > Is there any way to read or set the input error action, for example? > Shouldn't there be? There doesn't appear to be. The properties of an encoding object do not have to be mutable. The encoding property of as stream is mutable. CLISP treats the ANSI CL function stream-external-format as an accessor (i.e. supporting setf) and gives it a direction argument so that a stream can have different formats in the input and output directions: https://clisp.sourceforge.io/impnotes/stream-extfmt.html Also, there is a global variable (actually a symbol macro, not a special variable) for the default encoding; that is mutable also. https://clisp.sourceforge.io/impnotes/encoding.html#def-file-enc It's possible that a stream needs to take some special action if its external format is altered. That is to say, if we change the stream-external-format via the accessor, I would suspect that the accessor could be doing something more than just planting the new object into the stream. I wouldn't even tweak the ext:encoding-charset of an encoding, because I would have doubts about how the stream will react if it happens to have partially decoded a multi-byte character. _______________________________________________ clisp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/clisp-list