Uutf — Non-blocking streaming Unicode codec for OCaml
Uutf is a non-blocking streaming codec to decode and encode the UTF-8, UTF-16, UTF-16LE and UTF-16BE encoding schemes. It can efficiently work character by character without blocking on IO. Decoders perform character position tracking and support newline normalization.
Functions are also provided to fold over the characters of UTF encoded OCaml string values and to directly encode characters in OCaml Buffer.t values.
Uutf has no dependency and is distributed under the ISC license.
Home page: http://erratique.ch/software/uutf
Contact: Daniel Bünzli
Uutf can be installed with
opam install uutf
If you don't use
opam consult the
opam file for build
The documentation and API reference is automatically generated by from
the source interfaces. It can be consulted online or via
odig doc uutf.
Sample programs are located in the
test directory of the
distribution. They can be built and run with:
topkg build --test true && topkg test
The resulting binaries are in
test.nativetests the library, nothing should fail.
utftrip.native, among other things, reads unicode on
stdinand rewrites it on
stdout. Invoke with
--helpfor more information. Depends on Cmdliner.