package uuuu

  1. Overview
  2. Docs
Mapper of ISO-8859-* to Unicode

Install

Dune Dependency

Authors

Maintainers

Sources

uuuu-0.3.0.tbz
sha256=6b7ee8f3e343813b0c6ac8ddb7f6720b2ccd27b4208313d3bcff5d7d984fc3a6
sha512=4b26676fe809d2aba74614ab739315aa7b0f08469ff97400e05efba05e6e3fed4edf3ce5ed3b920e438f46f6b344f81c30a90534b27a8b09f4f0c69c29f68cc3

doc/uuuu/Uuuu/index.html

Module UuuuSource

Sourcetype encoding = [
  1. | `ISO_8859_1
  2. | `ISO_8859_2
  3. | `ISO_8859_3
  4. | `ISO_8859_4
  5. | `ISO_8859_5
  6. | `ISO_8859_6
  7. | `ISO_8859_7
  8. | `ISO_8859_8
  9. | `ISO_8859_9
  10. | `ISO_8859_10
  11. | `ISO_8859_11
  12. | `ISO_8859_13
  13. | `ISO_8859_14
  14. | `ISO_8859_15
  15. | `ISO_8859_16
]

The type of ISO-8859.

Sourceval encoding_of_string : string -> encoding

encoding_of_string s converts a (case insensitive) IANA character set name to an encoding.

Sourceval encoding_to_string : encoding -> string

encoding_to_string e is a IANA character set name for e.

Sourcetype 'kind decoder constraint 'kind = [< encoding ]

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
Sourceval src : 'kind 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 : [< encoding ] as 'kind -> src -> 'kind decoder

decoder encoding src is a decoder that inputs from src.

Encoding. encoding specifies the decoded encoding scheme.

Sourceval decode : 'kind 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 decoder.
  • `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 : 'kind decoder -> int

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

Sourceval decoder_src : 'kind decoder -> src

decoder_src d is d's input source.

Sourceval decoder_kind : 'kind decoder -> 'kind

decoder_kind d is d's the decoded encoding scheme of d.

Sourcemodule Char : sig ... end
Sourcemodule String : sig ... end
OCaml

Innovation. Community. Security.