package yuscii

  1. Overview
  2. Docs
Mapper of UTF-7 to Unicode

Install

Dune Dependency

Authors

Maintainers

Sources

yuscii-v0.3.0.tbz
sha256=ef8d87ed575d14547326887930f9d8c0a638d35c40889d5aacec79c45d5074b1
sha512=d9747ddc01ce0d35be6ec95ff09cf9a0cf67fa53449ce0d700e5c4e31b83e6cf5c8985b0f2e154087bae8ddcce6cb1d4f33819e538570e4308bbba7e21cd669f

doc/yuscii/Yuscii/index.html

Module YusciiSource

Sourcetype decoder

The type for decoders.

Sourcetype src = [
  1. | `Manual
  2. | `Channel of in_channel
  3. | `String of string
]

The type for input sources. With a `Manual source the client must provide input with src.

Sourcetype decode = [
  1. | `Await
  2. | `End
  3. | `Uchar of Uchar.t
  4. | `Malformed of string
]
Sourceval pp_decode : Format.formatter -> decode -> unit

pp_decode ppf v prints an unspecified representation of v on ppf.

Sourceval src : decoder -> Bytes.t -> int -> int -> unit

src d s j l provides d with l bytes to read, starting at j in s. This byte range is read by calls to decode with d until `Await is returned. To signal the end of input call the function with l = 0.

Sourceval decoder : src -> decoder

decoder encoding src is a decoder that inputs from src.

Encoding. encoding specifies the decoded encoding scheme.

Sourceval decode : decoder -> decode

decode d is:

  • `Await if d has a `Manual input source and awaits for more input. The client must use src to provide it.
  • `Uchar u if a Unicode scalar value u was decoded.
  • `End if the end of input was reached.
  • `Malformed err if d encountered an error err.

Note. Repeated invocation always eventually returns `End, even in case of errors.

Sourceval decoder_byte_count : decoder -> int

decoder_byte_count d is the number of characters already decoder on d (including malformed ones). This is the last decode's end byte offset counting from beginning of the stream.

Sourceval decoder_src : decoder -> src

decoder_src d is d's input source.

Sourcemodule String : sig ... end
OCaml

Innovation. Community. Security.