+@node External Formats
+@section External Formats
+@cindex External formats
+
+@findex @cl{stream-external-format}
+The encodings supported by SBCL as external formats are named by
+keyword. Each encoding has a canonical name, which will be encoding
+returned by @code{stream-external-format}, and a number of aliases for
+convenience, as shown in the table below:
+
+@include encodings.texi-temp
+
+@findex @cl{open}
+@findex @cl{with-open-file}
+In situations where an external file format designator is required, such
+as the @code{:external-format} argument in calls to @code{open} or
+@code{with-open-file}, users may supply the name of an encoding to
+denote the external format which is applying that encoding to Lisp
+characters.
+
+In addition to the basic encoding for an external format, options
+controlling various special cases may be passed, by using a list (whose
+first element must be an encoding name and whose rest is a plist) as an
+external file format designator. At present, the only supported key in
+the plist is @code{:replacement}, where the corresponding value is a
+string designator which is used as a replacement when an encoding or
+decoding error happens, handling those errors without user intervention;
+for example:
+@lisp
+(with-open-file (i pathname :external-format '(:utf-8 :replacement #\?))
+ (read-line i))
+@end lisp
+will read the first line of @var{pathname}, replacing any invalid utf-8
+sequences with question marks.
+
+@node Bivalent Streams
+@section Bivalent Streams
+
+A @dfn{bivalent stream} can be used to read and write both
+@code{character} and @code{(unsigned-byte 8)} values. A bivalent
+stream is created by calling @code{open} with the argument @code{:element-type
+:default}. On such a stream, both binary and character data can be
+read and written with the usual input and output functions.
+
+@c Horrible visual markup
+@quotation
+Streams are @emph{not} created bivalent by default for performance
+reasons. Bivalent streams are incompatible with
+@code{fast-read-char}, an internal optimization in sbcl's stream
+machinery that bulk-converts octets to characters and implements a
+fast path through @code{read-char}.
+@end quotation
+