File: README.md

package info (click to toggle)
uutf 1.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 204 kB
  • sloc: ml: 1,494; makefile: 17
file content (51 lines) | stat: -rw-r--r-- 1,596 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Uutf — Non-blocking streaming Unicode codec for OCaml
-------------------------------------------------------------------------------
v1.0.2

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 `<daniel.buenzl i@erratique.ch>`


## Installation

Uutf can be installed with `opam`:

    opam install uutf

If you don't use `opam` consult the [`opam`](opam) file for build
instructions.


## Documentation

The documentation and API reference is automatically generated by from
the source interfaces. It can be consulted [online][doc] or via
`odig doc uutf`.

[doc]: http://erratique.ch/software/uutf/doc/Uutf


## Sample programs

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 `_build/test` :

- `test.native` tests the library, nothing should fail.
- `utftrip.native`, among other things, reads unicode on `stdin` and rewrites 
  it on `stdout`. Invoke with `--help` for more information. Depends
  on [Cmdliner](http://erratique.ch/software/cmdliner).