Recommendations for handling Unicode? Camomile vs. Uutf and co.?

My job involves a lot of unicode stuff, and I’m not sure which libraries to use for Unicode. At the moment I’m using Uutf because it has better documentation, but it seems like Camomile is more widely used in the community.

Is there any special reason to use one or the other?

it seems like Camomile is more widely used in the community.

I have no particular recommendations as I have not used Camomile, but this isn’t my experience.

Going purely from the imperfect metric of opam rev-deps:

ᐅ opam list --short --depends-on uutf | wc -l

ᐅ opam list --short --depends-on camomile | wc -l
1 Like

Depends on what you need to do. Uutf just decodes the UTF-X encoding formats.

Camomile does a lot of other things but is stuck in a very old version of Unicode (unless things moved recently).

Some of these things (and more) can however also be performed by other small libraries that I publish and support the last version of Unicode. See “Unicode processing” on this page.

One notable omission from these small libraries is collation that you’ll find only in Camomile as far as I know – I do have a design for a Uu* library for that but lack a concrete project or funding to implement it (same for this Unicode text data structure).

Finally you may also want to checkout my OCaml Unicode tips.