- odr_set_charset (out, l1, l2);
- odr_set_charset (in, l2, l1);
+ xfree (outputCharset);
+ outputCharset = 0;
+ if (!strcmp(l2, "auto") && codeset)
+ {
+ if (codeset)
+ {
+ printf ("output charset: %s\n", codeset);
+ outputCharset = xstrdup(codeset);
+
+
+ }
+ else
+ printf ("No codeset found on this system\n");
+ }
+ else if (strcmp(l2, "-"))
+ outputCharset = xstrdup(l2);
+ else
+ printf ("Output charset conversion disabled\n");
+ }
+ if (outputCharset && negotiationCharset)
+ {
+ odr_set_charset (out, negotiationCharset, outputCharset);
+ odr_set_charset (in, outputCharset, negotiationCharset);
+ }
+ else
+ {
+ odr_set_charset (out, 0, 0);
+ odr_set_charset (in, 0, 0);