Library
Module
Module type
Parameter
Class
Class type
equal e1 e2
returns whether e1
and e2
denotes the same encoding. It does a caseless comparison of e1
or e2
without optionnal suffixes ("//IGNORE" or "//TRANSLIT").
val system : t
The character encoding used by the system
recode_string ~src ~dst str
recode str
from src
encoding to dst
encoding.
type decoding_result =
| Dec_ok of code_point * int
Dec_ok(code, num)
means that the operation succeed. code
is the unicode code-point read and num
is the number of bytes read by the decoder.
| Dec_need_more
Dec_not_finished
means that the input contains a not-terminated sequence
| Dec_error
Dec_error
means that the input contains an invalid sequence
Result of a decoding operation
val decode : decoder -> string -> int -> int -> decoding_result
decode decoder buffer ptr len
decodes with decoder
bytes at position ptr
in buffer
val encode : encoder -> string -> int -> int -> code_point -> encoding_result
encode decoder buffer ptr len code
encodes code
with encoder
at position ptr
in buffer