+ if (!yaz_matchstr(fromcode, "UTF8"))
+ {
+ cd->read_handle = yaz_read_UTF8;
+ cd->init_handle = yaz_init_UTF8;
+ }
+ else if (!yaz_matchstr(fromcode, "ISO88591"))
+ cd->read_handle = yaz_read_ISO8859_1;
+ else if (!yaz_matchstr(fromcode, "UCS4"))
+ cd->read_handle = yaz_read_UCS4;
+ else if (!yaz_matchstr(fromcode, "UCS4LE"))
+ cd->read_handle = yaz_read_UCS4LE;
+ else if (!yaz_matchstr(fromcode, "MARC8"))
+ cd->read_handle = yaz_read_marc8;
+#if HAVE_WCHAR_H
+ else if (!yaz_matchstr(fromcode, "WCHAR_T"))
+ cd->read_handle = yaz_read_wchar_t;
+#endif
+
+ if (!yaz_matchstr(tocode, "UTF8"))
+ cd->write_handle = yaz_write_UTF8;
+ else if (!yaz_matchstr(tocode, "ISO88591"))
+ cd->write_handle = yaz_write_ISO8859_1;
+ else if (!yaz_matchstr (tocode, "UCS4"))
+ cd->write_handle = yaz_write_UCS4;
+ else if (!yaz_matchstr(tocode, "UCS4LE"))
+ cd->write_handle = yaz_write_UCS4LE;
+#if HAVE_WCHAR_H
+ else if (!yaz_matchstr(tocode, "WCHAR_T"))
+ cd->write_handle = yaz_write_wchar_t;
+#endif