module Convert:sig..end
type error =
| |
NO_CONVERSION |
(* |
Conversion between the requested character sets is not supported
| *) |
| |
ILLEGAL_SEQUENCE |
(* |
Invalid byte sequence in conversion input
| *) |
| |
FAILED |
(* |
Conversion failed for some reason
| *) |
| |
PARTIAL_INPUT |
(* |
Partial character sequence at end of input
| *) |
| |
BAD_URI |
(* |
URI is invalid
| *) |
| |
NOT_ABSOLUTE_PATH |
(* |
Pathname is not an absolute path
| *) |
exception Error of error * string
val convert : string -> to_codeset:string -> from_codeset:string -> stringError .val convert_with_fallback : ?fallback:string ->
to_codeset:string -> from_codeset:string -> string -> stringError .val locale_from_utf8 : string -> stringUTF-8 to the encoding of the
current locale. If the locale's encoding is UTF-8, the string
is simply validated and returned unmodified.Error if the conversion failsError if the string is not a valid UTF-8 stringval locale_to_utf8 : string -> stringError .UTF-8. If the locale's encoding is UTF-8, the string is
simply validated and returned unmodified.val filename_from_utf8 : string -> stringError .val filename_to_utf8 : string -> stringError .val filename_from_uri : string -> string option * stringError .val filename_to_uri : ?hostname:string -> string -> stringError .val get_charset : unit -> bool * stringu,s where u is true if the character set is
UTF-8 and s is the character set name