Previous: , Up: External Formats   [Contents][Index]


13.2.2 Composing External Formats

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 '(:latin1 :crlf) 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 #\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.

FormatAliasesDescription
:crlf:dosComposing format for converting to/from DOS (CR/LF) end-of-line sequence to #\Newline
:cr:macComposing format for converting to/from DOS (CR/LF) end-of-line sequence to #\Newline
:beta-gkComposing format that translates (lower-case) Beta code (an ASCII encoding of ancient Greek)
:final-sigmaComposing 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


Previous: Available External Formats, Up: External Formats   [Contents][Index]