Module Markup.Encoding
Common Internet encodings such as UTF-8 and UTF-16; also includes some less popular encodings that are sometimes used for XML.
type tDecoders. These are notionally maps from byte streams to Unicode scalar value streams, i.e. pseudocode type
char stream -> int stream.
val decode : ?report:(location -> Error.t -> unit) -> t -> (char, 's) stream -> (int, 's) streamApplies a decoder to a byte stream. Illegal input byte sequences result in calls to the error handler
~reportwith error kind`Decoding_error. The illegal bytes are then skipped, and zero or more U+FFFD replacement characters are emitted. The default handler ignores errors.The locations provided to the error handler by the built-in decoders below in this module are fully accurate only if the input byte stream uses LF characters as line breaks.