Speaking-too-soon is a valid and powerful code verification technique; it
exploits tempting the bugs to make their move.
--
SP
___
Containers-users mailing list
Containers-users@lists.ocaml.org
http://lists.ocaml.org/listinfo/containers-users
Of course I spoke too soon, and missed so validation cases (that would
have been accepted by Peter's code).
In particular, I just learnt about some interesting corner cases of UTF8,
namely overlong encodings.
If anyone is knowledgeable about UTF8, reviewing the code would be
greatly appreciated!
I merged and adapted the code from Peter:
https://github.com/c-cube/ocaml-containers/blob/master/src/core/CCUtf8_string.mli
https://github.com/c-cube/ocaml-containers/blob/master/src/core/CCUtf8_string.ml
it's stricter (only accepts valid UTF8) and the random tests should
ensure that it agrees