Return the number of bytes in a UTF-8 character, while catching shortest possible illegal UTF-8 encoding.
#include <ldap_utf8.h>
int ldap_x_utf8_charlen2 (
const char *p);
(IN) Points to the UTF-8 character.
Returns length in bytes of the UTF-8 character. (1-6). 0 is returned for an invalid character.
The length of the character is determined by looking only at the first byte of the UTF-8 character.