+#if HAVE_WCHAR_H
+static unsigned long yaz_read_wchar_t (yaz_iconv_t cd, unsigned char *inp,
+ size_t inbytesleft, size_t *no_read)
+{
+ unsigned long x = 0;
+
+ if (inbytesleft < sizeof(wchar_t))
+ {
+ cd->my_errno = YAZ_ICONV_EINVAL; /* incomplete input */
+ *no_read = 0;
+ }
+ else
+ {
+ wchar_t wch;
+ memcpy (&wch, inp, sizeof(wch));
+ x = wch;
+ *no_read = sizeof(wch);
+ }
+ return x;
+}
+#endif
+
+static unsigned long yaz_read_marc8 (yaz_iconv_t cd, unsigned char *inp,
+ size_t inbytesleft, size_t *no_read)
+{
+ return yaz_marc8_conv(inp, inbytesleft, no_read);
+}
+