wrbuf_puts(buffer, "-");
int index;
for (index = 0; index < code_len; index++) {
- sprintf(temp, "%02X", (unsigned char) code_data[index] & 0xFF);
- temp[2] = 0;
- wrbuf_puts(buffer, temp);
+ sprintf(temp+2*index, "%02X", (unsigned char) code_data[index] & 0xFF);
};
- yaz_log(YLOG_WARN, "Using numeric value in element name: %s", wrbuf_cstr(buffer));
+ temp[2*code_len+1] = 0;
+ wrbuf_puts(buffer, temp);
+ yaz_log(YLOG_WARN, "Using numeric value in element name: %s", temp);
}
}
strlen(s->code_data + using_code_len));
marc_iconv_reset(mt, wr);
wrbuf_printf(wr, "</%s", subfield_name[turbo]);
- if (turbo)
- wrbuf_iconv_write_cdata(wr, mt->iconv_cd,
- s->code_data, using_code_len);
+ if (turbo)
+ element_name_encode(mt, wr, s->code_data, using_code_len);
wrbuf_puts(wr, ">\n");
}
wrbuf_printf(wr, " </%s", datafield_name[turbo]);
wrbuf_printf(wr, " -->\n");
break;
case YAZ_MARC_LEADER:
- wrbuf_printf(wr, " <%s>", leader_name[turbo]);
- wrbuf_iconv_write_cdata(wr,
- 0 /* no charset conversion for leader */,
+ wrbuf_printf(wr, " <%s>", leader_name[turbo]);
+ wrbuf_iconv_write_cdata(wr,
+ 0 , /* no charset conversion for leader */
n->u.leader, strlen(n->u.leader));
wrbuf_printf(wr, "</%s>\n", leader_name[turbo]);
}