simplified get_utf8_length()