+void wrbuf_iconv_reset(WRBUF b, yaz_iconv_t cd)
+{
+ if (cd)
+ {
+ char outbuf[12];
+ size_t outbytesleft = sizeof(outbuf);
+ char *outp = outbuf;
+ size_t r = yaz_iconv(cd, 0, 0, &outp, &outbytesleft);
+ if (r != (size_t) (-1))
+ wrbuf_write(b, outbuf, outp - outbuf);
+ }
+}
+