# define EILSEQ EINVAL
#endif
+int Charset_is_utf8 = 0;
+
/*
* The following list has been created manually from the data under:
* http://www.isi.edu/in-notes/iana/assignments/character-sets
}
return -1;
}
+
+void mutt_set_charset (char *charset)
+{
+ char buffer[STRING];
+
+ mutt_canonical_charset (buffer, sizeof (buffer), charset);
+
+ Charset_is_utf8 = 0;
+ if (!strcmp (buffer, "utf-8"))
+ Charset_is_utf8 = 1;
+
+#ifdef HAVE_BIND_TEXTDOMAIN_CODESET
+ bind_textdomain_codeset (PACKAGE, buffer);
+#endif
+}
+
+wchar_t replacement_char (void)
+{
+ return Charset_is_utf8 ? 0xfffd : '?';
+}