package markup

  1. Overview
  2. Docs
Error-recovering functional HTML5 and XML parsers and writers

Install

Dune Dependency

Authors

Maintainers

Sources

0.7.6.tar.gz
sha256=5eef9913c8664d1a8b6a06d8f1a80c1edf039228d7d80a0b2b2ad6a2f6b2eaef
md5=866dd2cdb3e304787b26fe8ed53f1f67

doc/markup/Markup/Encoding/index.html

Module Markup.EncodingSource

Common Internet encodings such as UTF-8 and UTF-16; also includes some less popular encodings that are sometimes used for XML.

Sourcetype t

Decoders. These are notionally maps from byte streams to Unicode scalar value streams, i.e. pseudocode type char stream -> int stream.

Sourceval decode : ?report:(location -> Error.t -> unit) -> t -> (char, 's) stream -> (int, 's) stream

Applies a decoder to a byte stream. Illegal input byte sequences result in calls to the error handler ~report with 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.

Sourceval utf_8 : t
Sourceval utf_16be : t
Sourceval utf_16le : t
Sourceval utf_16 : t
Sourceval iso_8859_1 : t
Sourceval us_ascii : t
Sourceval windows_1251 : t
Sourceval windows_1252 : t
Sourceval ucs_4be : t
Sourceval ucs_4le : t
Sourceval ucs_4be_transposed : t
Sourceval ucs_4le_transposed : t
Sourceval ebcdic : t

Code page 37.

OCaml

Innovation. Community. Security.