package rosetta
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=dd6d662bf71bf3f305d60922d2b6f84e6570a816bf32b3e22360227753ff951f
sha512=e9e22e949a483ec1d67b00e68ac712fc125e71c92882a90fcbc97d10be8219d27260d825914ac6cc2832c17d5d8e662a2b308ff2f668f59170892d39a7e3d0af
doc/rosetta/Rosetta/index.html
Module RosettaSource
The type of encoding.
encoding_of_string s converts a (case sensitive) IANA character set name to an encoding.
encoding_to_string e is a IANA character set name for e.
The type for input sources. With a `Manual source the client must provide input with src.
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:
`Awaitifdhas a`Manualinput source and awaits for more input. The client must usesrcto provide it.`Uchar uif a Unicode scalar valueuwas decoder.`Endif the end of input was reached.`Malformed errifdencountered an errorerr.
Note. Repeated invocation always eventually returns `End, even in case of errors.
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.
decoder_kind d is d's the decoded encoding scheme of d.
val to_utf_8_string :
?rep:Uchar.t ->
charset:string ->
?off:int ->
?len:int ->
string ->
string optionto_utf_8_string ~charset str converts a given string str encoded with the character set charset into a string in UTF-8. If the character set is not recognised (among Rosetta.encoding), it returns None.