sig
external iconv_get_version_opt : unit -> (int * int) option
= "mliconv_get_version_opt"
val iconv_get_version_string_opt : unit -> string option
type iconv_t
external iconv_open : tocode:string -> fromcode:string -> Iconv.iconv_t
= "mliconv_open"
external substitute : Iconv.iconv_t -> string = "mliconv_substitute"
external set_substitute : Iconv.iconv_t -> string -> unit
= "mliconv_set_substitute"
external unexist : Iconv.iconv_t -> [> `auto | `illegal_sequence ]
= "mliconv_unexist"
external set_unexist :
Iconv.iconv_t -> [< `auto | `illegal_sequence ] -> unit
= "mliconv_set_unexist"
external min_sequence_in_fromcode : Iconv.iconv_t -> int
= "mliconv_min_sequence_in_fromcode"
type iconv_fields = {
mutable inbuf : string;
mutable inbuf_offset : int;
mutable inbytesleft : int;
mutable outbuf : bytes;
mutable outbuf_offset : int;
mutable outbytesleft : int;
}
val iconv :
Iconv.iconv_t ->
Iconv.iconv_fields -> bool -> [> `illegal_sequence | `ok | `overflow ]
val iconv_substitute :
Iconv.iconv_t -> Iconv.iconv_fields -> bool -> [> `ok | `overflow ]
val iconv_end : Iconv.iconv_t -> Iconv.iconv_fields -> [> `ok | `overflow ]
external iconv_reset : Iconv.iconv_t -> unit = "mliconv_iconv_reset"
val iconv_substring : Iconv.iconv_t -> string -> int -> int -> string
val iconv_string : Iconv.iconv_t -> string -> string
type iconv_decode_state
type iconv_decode = private Iconv.iconv_t * Iconv.iconv_decode_state
val iconv_open_decode : fromcode:string -> Iconv.iconv_decode
type iconv_decode_error = [ `illegal_sequence | `none | `truncated ]
val iconv_decode :
Iconv.iconv_decode ->
('a -> 'b -> char) ->
('a -> 'b -> 'b) ->
('a -> 'b -> bool) ->
('a -> 'b -> 'b -> Stdlib.Uchar.t -> 'c) ->
fail:('a -> 'b -> 'b -> [> Iconv.iconv_decode_error ] -> 'c) ->
'a -> 'b -> 'c
module Out_iconv = Iconv.Out_iconv
end