Page
Library
Module
Module type
Parameter
Class
Class type
Source
Encodingequal 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 : tThe 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 * intDec_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_moreDec_not_finished means that the input contains a not-terminated sequence
| Dec_errorDec_error means that the input contains an invalid sequence
Result of a decoding operation
val decode : decoder -> string -> int -> int -> decoding_resultdecode decoder buffer ptr len decodes with decoder bytes at position ptr in buffer
val encode : encoder -> string -> int -> int -> code_point -> encoding_resultencode decoder buffer ptr len code encodes code with encoder at position ptr in buffer