+ chrwork buf;
+
+ if (argc != 3)
+ {
+ logf(LOG_FATAL, "charmap directive qmap requires 2 args");
+ ++errors;
+ }
+ buf.map = res;
+ buf.string[0] = '\0';
+ if (scan_string(argv[2], t_unicode, t_utf8,
+ fun_mkstring, &buf, 0) < 0)
+ {
+ logf(LOG_FATAL, "Bad qmap target");
+ ++errors;
+ }
+ if (scan_string(argv[1], t_unicode, t_utf8,
+ fun_add_qmap, &buf, 0) < 0)
+ {
+ logf(LOG_FATAL, "Bad qmap source");
+ ++errors;
+ }
+ }
+ else if (!yaz_matchstr(argv[0], "encoding"))
+ {
+ /*
+ * Fix me. When t_unicode==0 and use encoding directive in *.chr file the beheviour of the
+ * zebra need to comment next part of code.
+ */
+
+ /* Original code */
+#if 1
+ if (t_unicode != 0)
+ yaz_iconv_close (t_unicode);
+ t_unicode = yaz_iconv_open (ucs4_native, argv[1]);
+#endif
+ /*
+ * Fix me. It is additional staff for conversion of characters from local encoding
+ * of *.chr file to UTF-8 (internal encoding).
+ * NOTE: The derective encoding must be first directive in *.chr file.
+ */
+ /* For whatever reason Oleg enabled this.. */