X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fopac_to_xml.c;h=f365082167efa73c73c8058ce100c0b572b100f9;hp=1f0c9a3115aa58a31d4d010c472800e07a07d97a;hb=8ceaeefe2e491935cba91f56007308be6e4996e6;hpb=1b7419b08b3ac1d58bc8a147a5a563174276e151 diff --git a/src/opac_to_xml.c b/src/opac_to_xml.c index 1f0c9a3..f365082 100644 --- a/src/opac_to_xml.c +++ b/src/opac_to_xml.c @@ -191,6 +191,22 @@ void yaz_opac_decode_wrbuf(yaz_marc_t mt, Z_OPACRecord *r, WRBUF wrbuf) yaz_opac_decode_wrbuf2(mt, r, wrbuf, 0); } +int yaz_opac_check_marc21_coding(const char *charset, Z_OPACRecord *r) +{ + if (r->bibliographicRecord) + { + Z_External *ext = r->bibliographicRecord; + if (ext->which == Z_External_octet) + { + return yaz_marc_check_marc21_coding( + charset, + (const char *) ext->u.octet_aligned->buf, + ext->u.octet_aligned->len); + } + } + return 0; +} + /* * Local variables: * c-basic-offset: 4