Jackson Tale
Jackson Tale

Reputation: 25812

Does `string` in OCaml support UTF-8?

Does the type string in OCaml support utf8?

Or what library I should use for utf8 string?

Upvotes: 19

Views: 5782

Answers (2)

Jeffrey Scofield
Jeffrey Scofield

Reputation: 66803

The string type of OCaml consists of a series of 8-bit bytes in essence. You can store a UTF-8 value in a string, and I have often done this. However, there's no built-in support for handling them. A good library for handling Unicode in OCaml (so I've heard) is Camomile.

Upvotes: 16

user2299816
user2299816

Reputation:

There is also Uutf if you're looking for just unicode conversion.

Upvotes: 4

Related Questions