-
- oident *ent = oid_getentbyoid(pext->direct_reference);
-
- if (ent && ent->value == VAL_CHARNEG3
- && ent->oclass == CLASS_NEGOT
- && pext->which == Z_External_charSetandLanguageNegotiation)
+
+ int oclass;
+ const char *name = yaz_oid_to_string(yaz_oid_std(),
+ pext->direct_reference,
+ &oclass);
+
+ if (oclass == CLASS_NEGOT
+ && name && !strcmp(name, OID_STR_CHARNEG_3)
+ && pext->which == Z_External_charSetandLanguageNegotiation)