Reads a single codepoint from the UTF-8 sequence being pointed to by str.
The maximum number of bytes read is strlen, unless strlen is
negative (in which case up to 4 bytes are read).
If a valid codepoint could be read, it is stored in the variable
pointed to by codepoint_ref, otherwise that variable will be set to -1.
In case of success, the number of bytes read is returned; otherwise, a
negative error code is returned.
Reads a single codepoint from the UTF-8 sequence being pointed to by str. The maximum number of bytes read is strlen, unless strlen is negative (in which case up to 4 bytes are read).
If a valid codepoint could be read, it is stored in the variable pointed to by codepoint_ref, otherwise that variable will be set to -1. In case of success, the number of bytes read is returned; otherwise, a negative error code is returned.