X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fmarcdisp.c;h=f03d70f99c3987f59c2309ebbdd27b76bb4be9e5;hp=32718898f7817e4f5c2ee2906b5b7947efa68ab2;hb=3d6e2f0931ae87fe01e857d4573d946f6cd8e6f1;hpb=f36abe0a776fa52b972a3fec1b46b94e26814f22 diff --git a/src/marcdisp.c b/src/marcdisp.c index 3271889..f03d70f 100644 --- a/src/marcdisp.c +++ b/src/marcdisp.c @@ -1465,6 +1465,16 @@ void yaz_marc_write_using_libxml2(yaz_marc_t mt, int enable) mt->write_using_libxml2 = enable; } +int yaz_marc_check_marc21_coding(const char *charset, + const char *marc_buf, int sz) +{ + if (charset && (!yaz_matchstr(charset, "MARC8?") || + !yaz_matchstr(charset, "MARC8")) && marc_buf && sz > 25 + && marc_buf[9] == 'a') + return 1; + return 0; +} + /* * Local variables: * c-basic-offset: 4