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=b96010d5ab5a833900b15a8027160c2b3632a01b;hb=6533da485c4fcf4bc1bb6d70d0b18b13602381ff;hpb=e529ed18a6825f980bb16b230e56c6d53743ced1 diff --git a/src/opac_to_xml.c b/src/opac_to_xml.c index b96010d..f365082 100644 --- a/src/opac_to_xml.c +++ b/src/opac_to_xml.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2013 Index Data + * Copyright (C) Index Data * See the file LICENSE for details. */ /** @@ -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