package uuuu
Library
Module
Module type
Parameter
Class
Class type
type encoding = [
|
`ISO_8859_1
|
`ISO_8859_2
|
`ISO_8859_3
|
`ISO_8859_4
|
`ISO_8859_5
|
`ISO_8859_6
|
`ISO_8859_7
|
`ISO_8859_8
|
`ISO_8859_9
|
`ISO_8859_10
|
`ISO_8859_11
|
`ISO_8859_13
|
`ISO_8859_14
|
`ISO_8859_15
|
`ISO_8859_16
]
The type of ISO-8859.
val encoding_of_string : string -> encoding
encoding_of_string s
converts a (case insensitive) IANA character set name to an encoding.
val encoding_to_string : encoding -> string
encoding_to_string e
is a IANA character set name for e
.
type 'kind decoder constraint 'kind = [< encoding ]
The type for decoders.
The type for input sources. With a `Manual
source the client must provide input with src
.
val pp_decode : Format.formatter -> [< decode ] -> 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
.
decoder encoding src
is a decoder that inputs from src
.
Encoding. encoding
specifies the decoded encoding scheme.
decode d
is:
`Await
ifd
has a`Manual
input source and awaits for more input. The client must usesrc
to provide it.`Uchar u
if a Unicode scalar valueu
was decoder.`End
if the end of input was reached.`Malformed err
ifd
encountered an errorerr
.
Note. Repeated invocation always eventually returns `End
, even in case of errors.
val 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.
val decoder_kind : 'kind decoder -> 'kind
decoder_kind d
is d
's the decoded encoding scheme of d
.
module Char : sig ... end
module String : sig ... end