is_unicode_valid
if (!is_unicode_valid(value))
if ((types & B_ASN1_UTF8STRING) && !is_unicode_valid(value))