+static size_t get_subfield_len(yaz_marc_t mt, const char *data,
+ int identifier_length)
+{
+ /* if identifier length is 2 (most MARCs) or less (probably an error),
+ the code is a single character .. However we've
+ seen multibyte codes, so see how big it really is */
+ if (identifier_length > 2)
+ return identifier_length - 1;
+ else
+ return cdata_one_character(mt, data);
+}