A composing external format is an external format that converts between
one codepoint and another, rather than between codepoints and octets.
A composing external format must be used in conjunction with another
(octet-producing) external format. This is specified by
using a list as the external format. For example, we can use
'( as the external format. In this
particular example, the external format is latin1, but whenever a
carriage-return/linefeed sequence is read, it is converted to the Lisp
:latin1 :crlf)#\Newline character. Conversely, whenever a string is written,
a Lisp #\Newline character is converted to a
carriage-return/linefeed sequence. Without the :crlf composing
format, the carriage-return and linefeed will be read in as separate
characters, and on output the Lisp #\Newline character is
output as a single linefeed character.
Table 13.2 lists the available composing formats.
| Format | Aliases | Description |
|---|---|---|
:crlf | :dos | Composing format for converting to/from DOS (CR/LF) end-of-line sequence to #\Newline |
:cr | :mac | Composing format for converting to/from DOS (CR/LF) end-of-line sequence to #\Newline |
:beta-gk | Composing format that translates (lower-case) Beta code (an ASCII encoding of ancient Greek) | |
:final-sigma | Composing format that attempts to detect sigma in word-final position and change it from U+3C3 to U+3C2 |
Table 13.2: Composing external formats